Beispiel #1
0
        public Task WriteToServerAsync(string destinationTable, BulkOptions bulkOptions, CancellationToken cancellationToken, params string[] fields)
        {
            BulkCopy bulk = scopedContext.ContextProvider.GetBulkCopy(scopedContext, reader, destinationTable,
                                                                      scopedContext.PrepareBulkOptions(bulkOptions), fields);

            return(bulk.WriteToServerAsync(cancellationToken));
        }
Beispiel #2
0
        public void WriteToServer(string destinationTable, BulkOptions bulkOptions, params string[] fields)
        {
            BulkCopy bulk = scopedContext.ContextProvider.GetBulkCopy(scopedContext, reader, destinationTable,
                                                                      scopedContext.PrepareBulkOptions(bulkOptions), fields);

            bulk.WriteToServer();
        }