public void InsertBatch(IList <Employee> employees) { var options = new BulkCopyOptions() { BulkCopyType = BulkCopyType.MultipleRows }; using (var db = new OrmCookbook()) db.BulkCopy(options, employees); }
public void BulkInsert(IList <Employee> employees) { var options = new BulkCopyOptions() { BulkCopyType = BulkCopyType.ProviderSpecific }; using (var db = new OrmCookbook()) db.BulkCopy(options, employees); }
public void InsertLargeBatch(IList <Employee> employees, int batchSize) { var options = new BulkCopyOptions() { BulkCopyType = BulkCopyType.MultipleRows, MaxBatchSize = batchSize }; using (var db = new OrmCookbook()) db.BulkCopy(options, employees); }