11using System ;
22using System . Collections . Generic ;
3- using System . Threading ;
4- using System . Threading . Tasks ;
53using System . Data ;
64using System . Linq ;
75using System . Data . Common ;
@@ -18,19 +16,18 @@ partial class DB2iSeriesBulkCopy : BasicBulkCopy
1816 //Copied from DB2BulkCopy
1917 private static BulkCopyRowsCopied ProviderSpecificCopyImpl_DB2 < T > (
2018 ITable < T > table ,
21- DataOptions dataOptions ,
19+ BulkCopyOptions options ,
2220 IEnumerable < T > source ,
2321 DataConnection dataConnection ,
2422 DbConnection connection ,
2523 DB2 . DB2ProviderAdapter . BulkCopyAdapter bulkCopy ,
2624 Action < DataConnection , Func < string > , Func < int > > traceAction )
2725 {
28- var options = dataOptions . BulkCopyOptions ;
29- var descriptor = dataConnection . MappingSchema . GetEntityDescriptor ( typeof ( T ) ) ;
26+ var descriptor = table . DataContext . MappingSchema . GetEntityDescriptor ( typeof ( T ) , dataConnection . Options . ConnectionOptions . OnEntityDescriptorCreated ) ;
3027 var columns = descriptor . Columns . Where ( c => ! c . SkipOnInsert || options . KeepIdentity == true && c . IsIdentity ) . ToList ( ) ;
3128 var rd = new BulkCopyReader < T > ( dataConnection , columns , source ) ;
3229 var rc = new BulkCopyRowsCopied ( ) ;
33- var sqlBuilder = dataConnection . DataProvider . CreateSqlBuilder ( dataConnection . MappingSchema , dataOptions ) ;
30+ var sqlBuilder = dataConnection . DataProvider . CreateSqlBuilder ( table . DataContext . MappingSchema , dataConnection . Options ) ;
3431 var tableName = GetTableName ( sqlBuilder , options , table ) ;
3532
3633 var bcOptions = DB2BulkCopyOptions . Default ;
@@ -47,7 +44,7 @@ private static BulkCopyRowsCopied ProviderSpecificCopyImpl_DB2<T>(
4744 {
4845 bc . NotifyAfter = notifyAfter ;
4946
50- bc . DB2RowsCopied += ( sender , args ) =>
47+ bc . DB2RowsCopied += ( _ , args ) =>
5148 {
5249 rc . RowsCopied = args . RowsCopied ;
5350 options . RowsCopiedCallback ( rc ) ;
0 commit comments