Dapper Plus extends your IDbConnection with high-performance bulk operations: BulkInsert, BulkUpdate, BulkDelete, BulkMerge, and more.
We offer monthly trial, you can download a new trial every month.
Online examples are now available!
Mapper
Dapper Plus Mapper allow to map the conceptual model (Entity) with the storage model (Database) and configure options to perform Bulk Actions. An entity can be mapped more than once using a MappingKey.
MappingKey
// Easy to use DapperPlusManager.Entity<Customer>().Table("Customers") .Identity(x => x.CustomerID); // Easy to customize DapperPlusManager.Entity<Customer>("TheMappingKey").Table("Customers") .Identity(x => x.CustomerID) .Map(x => new { x.CustomerName, x.ContactName }) .BatchSize(200);
Bulk Actions
Bulk Actions allow to perform a bulk insert, update, delete or merge and include related child items.
connection.BulkInsert(customers); connection.BulkMerge(customers);
Also Bulk Actions
Also Bulk Actions allow to perform bulk action with a lambda expression using entities from the last Bulk[Action] or ThenBulk[Action] used.
connection.BulkInsert(orders) .AlsoBulkInsert(order => order.Items) .AlsoBulkInsert(order => order.Invoice) .AlsoBulkInsert(order => order.Invoice.Items);
Then Bulk Actions
Then Bulk Actions is similar to Also Bulk Actions but move foward the chaining for the next bulk action.
connection.BulkInsert(orders) .ThenBulkInsert(order => order.Invoice) .ThenBulkInsert(invoice => invoice.Items);
Utilities Actions
The Dapper Plus utilities give you more flexibility to control chaining methods.
connection.BulkInsert(orders) .ThenForEach(order => order.Items.ForEach(y => y.OrderID = order.OrderID)) .ThenBulkInsert(order => order.Items);