Dapper.Plus is a small library that you can add to your project which will extend your IDbConnection and IDbTransaction interfaces with high efficient Bulk operations methods.
Using this library, you can perform saving operations in the fastest way. It can be used with or without Dapper, and it is also compatible with all others Dapper packages.
Dapper.Plus is only available through NuGet: https://www.nuget.org/packages/Z.Dapper.Plus/
You can easily install this library by running the following command:
PM> Install-Package Z.Dapper.Plus
Every month, a FREE trial of the PRO version is available to let you evaluate all its features without limitations.
|Bulk Action Async||Yes|
|Bulk Also Action||Yes|
|Bulk Then Action||Yes|
|Support & Upgrades (1 year)||Yes|
More information can be found at: http://dapper-plus.net/
Once you installed this library then the following extension methods will automatically add to DbConnection:
There is no configuration required and no need for extra coding. You can easily use these extension methods in your code.
// Bulk Insert connection.BulkInsert(invoices) .ThenForEach(x => x.Items.ForEach(y => y.InvoiceID = x.InvoiceID)) .ThenBulkInsert(x => x.Items); // Bulk Update connection.BulkUpdate(invoices, x => x.Items); // Bulk Delete connection.BulkDelete(invoices.SelectMany(x => x.Items)) .BulkDelete(invoices); // Bulk Merge connection.BulkMerge(invoices) .ThenForEach(x => x.Items.ForEach(y => y.InvoiceID = x.InvoiceID)) .ThenBulkMerge(x => x.Items);
You can find the detailed documentation here: http://dapper-plus.net/overview
DB Provider Supported
Dapper.Plus is compatible with all major database provider:
- SQL Server 2008+
- SQL Azure
- SQL Compact
If you have any further queries, contact the outstanding customer support for any request, and you will get your answer within the next business day, hour, or minutes!