zzzprojects / Dapper-Plus

Dapper Plus - High-Efficient Bulk Actions (Insert, Update, Delete, and Merge) for .NET
https://dapper-plus.net/
380 stars 84 forks source link

plan to release real Async method #119

Closed znyet closed 1 year ago

znyet commented 1 year ago

hello JonathanMagnan. When do you plan to release the real Async method.

JonathanMagnan commented 1 year ago

Hello @znyet ,

Unfortunately, we could not agree on how to add async method to bulk operations due to how chaining action currently work in Dapper Plus.

Currently, using Async can only be done with the BulkActionAsync.

Here is an example with a cancellation token:

var task = connection.BulkActionAsync(x => x.BulkInsert(invoices).ThenBulkInsert(y => y.InvoiceItems), cancellationToken);

Doc: https://dapper-plus.net/async-action

Best Regards,

Jon