Dapper Plus


Downloaded more than
0
times !
// CONFIGURE & MAP entity DapperPlusManager.Entity<Order>() .Table("Orders") .Identity(x => x.ID); // CHAIN & SAVE entity connection.BulkInsert(orders) .AlsoInsert(order => order.Items); .Include(x => x.ThenMerge(order => order.Invoice) .AlsoMerge(invoice => invoice.Items)) .AlsoMerge(x => x.ShippingAddress);



What's Dapper Plus?

A library extending your IDbConnection with bulk operations: BulkInsert, BulkUpdate, BulkDelete, BulkMerge, and more



Do you offer consulting services?

Yes, you can contact us for special requests: info@zzzprojects.com



Where can I find online examples?

Online example is now available on .NET Fiddle!

Online Examples

Our achievements

2000+ Customers
75+ Countries
4000+ Requests closed
Over 10 000 000+ downloads
Over 1 000 000+ daily visitors

What we achieved over the last 4 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.



Mapper

Dapper Plus Mapper allow to map the conceptual model (Entity) with the storage model (Database) and configure options to perform Bulk Actions.

Dapper Plus - Mapper Example
// Easy to use
DapperPlusManager.Entity<Order>().Table("Orders")
                                 .Identity(x => x.ID)
                                 .BatchSize(200);

Bulk Actions

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

  • Bulk Insert
  • Bulk Update
  • Bulk Delete
  • Bulk Merge
Dapper Plus - Bulk Actions Example
connection.BulkInsert(orders, order => order.Items)
          .BulkInsert(invoices, invoice => invoice.Items)
          .BulkMerge(shippingAddresses);

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)
          .AlsoInsert(order => order.Items)
          .AlsoInsert(order => order.Invoice)
          .AlsoInsert(order => order.Invoice.Items);

Then Bulk Actions

Then Bulk Actions is similar to Also Bulk Actions but modify entities used for the next bulk action using a lambda expression.

Dapper Plus - Then Bulk Actions Example
connection.BulkInsert(orders)
          .AlsoInsert(order => order.Items)
          .ThenInsert(order => order.Invoice)
          .ThenInsert(invoice => invoice.Items);

Include Actions

The Dapper Plus Include method allow resolving issues with multiple "ThenBulk[Action]" method.

Dapper Plus - Include Actions Example
connection.BulkInsert(orders)
          .Include(x => x.ThenInsert(order => order.Items)
                         .ThenInsert(orderItem => orderItem.Metas))
          .Include(x => x.ThenInsert(order => order.Invoice)
                         .ThenInsert(Invoice => invoice.Items));