Skip to content

Bug: SqlDbHelper.GetFields is failing if the transaction object is present. #278

@mikependon

Description

@mikependon

at System.Data.SqlClient.SqlCommand.ValidateCommand(Boolean async, String method)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at RepoDb.DbHelpers.SqlDbHelper.GetFields[TDbConnection](TDbConnection connection, String tableName) at RepoDb.DbFieldCache.GetInternal[TDbConnection](TDbConnection connection, String tableName) at RepoDb.DbConnectionExtension.<>c__DisplayClass167_02.b__0()
at RepoDb.Contexts.Execution.InsertExecutionContextCache1.Get(String tableName, IEnumerable1 fields, Func1 callback) at RepoDb.DbConnectionExtension.InsertInternalBase[TEntity,TResult](IDbConnection connection, String tableName, TEntity entity, IEnumerable1 fields, Nullable1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder, Boolean skipIdentityCheck) at RepoDb.DbConnectionExtension.InsertInternal[TEntity,TResult](IDbConnection connection, TEntity entity, Nullable1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder)
at RepoDbTest.Program.<>c__DisplayClass1_1.

b__0(Person p) in C:\Users\MIPEN\source\repos\RepoDbTest\RepoDbTest\Program.cs:line 25
at System.Collections.Generic.List1.ForEach(Action1 action)
at RepoDbTest.Program.Main(String[] args) in C:\Users\MIPEN\source\repos\RepoDbTest\RepoDbTest\Program.cs:line 25

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdeployedFeature or bug is deployed at the current releasepriorityTop priority feature or things to do

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions