C# Bulk Operations BulkInsert, BulkDelete, BulkUpdate, BulkMerge, and more!

Downloaded more than
times !
// Easy to use
var bulk = new BulkOperation(connection);

// Easy to customize
var bulk = new BulkOperation<Customer>(connection);
bulk.BatchSize = 1000;
bulk.ColumnInputExpression = c => new { c.Name,  c.FirstName };
bulk.ColumnOutputExpression = c => c.CustomerID;
bulk.ColumnPrimaryKeyExpression = c => c.Code;

What's Bulk Operations?

Overcome SqlBulkCopy limitations by adding high-performance bulk operations: BulkInsert, BulkUpdate, BulkDelete, BulkMerge, and more.

Do you offer a free trial?

Yes, we do!
You can extend your trial for several months by downloading the latest version at the beginning of every month.


Where can I find online examples?

Online examples are now available!

Online Examples

Our achievements

5000+ Customers
75+ Countries
8000+ Requests closed
50 000 000+downloads
4 000 000+daily visitors

What we achieved over the last 5 years has grown beyond our hopes. That motivates us to continue to grow and improve all our projects. Every day, we are committed to listening to our clients to help ease the daily dev workload as much as possible.

Output Identity Value

Overcome SqlBulkCopy limitations and use flexible features to output inserted identity and concurrency column values.

Bulk Operations - Output Identity Example
var bulk = new BulkOperation(connection)

// Output newly inserted identity value after an insert
bulk.ColumnMappings.Add("CustomerID", ColumnMappingDirectionType.Output);


Try it

Insert, Update, Delete, Merge and more...

Bulk Operations is not only about inserting, get more capability over SqlBulkCopy.

  • BulkInsert
  • BulkUpdate
  • BulkDelete
  • BulkMerge (Upsert)
  • BulkSaveChanges
  • BulkSynchronize
Bulk Operations - Methods Example
// Support all type of operations
var bulk = new BulkOperation(connection);

Generic List<> as DataSource

Improve code maintainability by using strongly-typed lambda expression over hard coded string.

  • Use Bulk Operations with Generic List<>
  • Use Bulk Operations with Expando Object
  • Use Lambda Expression for mapping
Bulk Operations - Entity Example
var bulk= new BulkOperation<Customer>(connection);
bulk.DestinationTableName = "Customer";

// Column Columns to Input
bulk.ColumnInputExpression = c => new { c.Code, c.Name };

// Choose Columns to Output
bulk.ColumnOutputExpression = c => c.CustomerID;

// Choose Key to Use
bulk.ColumnPrimaryKeyExpression = c => c.Code;


Bulk Operations from LINQ Query

Perform bulk operations from LINQ Query without loading entities in memory.

  • DeleteFromQuery
  • UpdateFromQuery
Bulk Operations - Batch Delete & Update Example
var bulk = new BulkOperation<Customer>(connection);

// DELETE all customers inactive for more than 2 years
    c => c.Where(x => x.LastLogin < DateTime.Now.AddYears(-2)));

// UPDATE all customers inactive for more than 2 years
    c => c.Where(x => x.Active && x.LastLogin < DateTime.Now.AddYears(-2)),
    c => new Customer {Active = false});

AutoMap with Case Insensitive

Sick of not being able to map column because of case sensitivity issue? Use flexible features to customize configuration

  • Auditing
  • Batch Size
  • Case Sensitivity
  • Logging
Bulk Operations - Case Insensitive Example
var bulk = new BulkOperation(connection);
bulk.CaseSensitive = CaseSensitiveType.Insensitive;
bulk.ColumnMappings.Add("cOdE", "Code");