public static async Task BulkInsertAsync(this IDAC dac, DataTable table, BulkInsertOptions bulkInsertOptions, TimeSpan timeout, CancellationToken cancellationToken) { // Begin a scope to make sure it's disposed if cancellationToken is turned on using (var scope = dac.BeginScope()) { await Task.Run(() => dac.BulkInsert(table, bulkInsertOptions, timeout), cancellationToken); } }
public virtual void BulkInsert(DataTable table, BulkInsertOptions bulkInsertOptions, TimeSpan timeout) { DecoratedDAC.BulkInsert(table, bulkInsertOptions, timeout); }