Bulk Operations - Bulk Insert

Bulk Insert

Execute an INSERT operation.

Example - Bulk Insert

var dt = new DataTable();
// ...seed...

var bulk = new BulkOperation(connection);

// Easy to customize
bulk.BatchSize = 1000;

// Easy to use
bulk.BulkInsert(dt);

Example - Bulk Insert Generic

var list = new List<Customer>();
// ...seed...

var bulk = new BulkOperation<Customer>(connection);

// Easy to customize
bulk.BatchSize = 1000;

// Easy to use
bulk.BulkInsert(customers);

Performance Benchmarks

Operations 1,000 Rows 10,000 Rows 100,000 Rows 1,000,000 Rows
BulkInsert 6 ms 25 ms 200 ms 2,000 ms