File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
src/Microsoft.Data.SqlClient
netcore/src/Microsoft/Data/SqlClient
netfx/src/Microsoft/Data/SqlClient Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ override protected DbCommand CreateDbCommand()
159159 DbProviderFactory providerFactory = ConnectionFactory . ProviderFactory ;
160160 command = providerFactory . CreateCommand ( ) ;
161161 command . Connection = this ;
162+ if ( InnerConnection is SqlInternalConnection { CurrentTransaction : { Parent : { } transaction } } )
163+ {
164+ command . Transaction = transaction ;
165+ }
166+
162167 return command ;
163168 }
164169 }
Original file line number Diff line number Diff line change @@ -205,6 +205,11 @@ override protected DbCommand CreateDbCommand()
205205 DbProviderFactory providerFactory = ConnectionFactory . ProviderFactory ;
206206 DbCommand command = providerFactory . CreateCommand ( ) ;
207207 command . Connection = this ;
208+ if ( InnerConnection is SqlInternalConnection { CurrentTransaction : { Parent : { } transaction } } )
209+ {
210+ command . Transaction = transaction ;
211+ }
212+
208213 return command ;
209214 }
210215 }
You can’t perform that action at this time.
0 commit comments