Dapper Plus Extend your IDbConnection with high-performance bulk operations



Downloads:
891163
Customers:
2000+

What's Dapper Plus?

What's Dapper Plus?

Dapper Plus extends your IDbConnection with high-performance bulk operations: BulkInsert, BulkUpdate, BulkDelete, BulkMerge, and more.

Do you offer a free trial?

Do you offer a free trial?

We offer monthly trial, you can download a new trial every month.

Where can I find online examples?

Where can I find online examples?

Online examples are now available!

Online Examples

Supported Providers

SQL Server
SQL Azure
MySQL
PostgreSQL
SQLite

Features

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.

Dapper Plus - Mapper Example
// 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);
Run

Bulk Actions

Bulk Actions allow to perform a bulk insert, update, delete or merge and include related child items.

Dapper Plus - Bulk Actions Example
connection.BulkInsert(customers);
connection.BulkMerge(customers);
Run

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.

Dapper Plus - Also Bulk Actions Example
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.

Dapper Plus - Then Bulk Actions Example
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.

Dapper Plus - Include Actions Example
connection.BulkInsert(orders)
    .ThenForEach(order => order.Items.ForEach(y => y.OrderID = order.OrderID))
          .ThenBulkInsert(order => order.Items);