Dapper icon indicating copy to clipboard operation
Dapper copied to clipboard

Support for DbBatch

Open kmcclellan opened this issue 3 years ago • 0 comments

Some providers don't support pipelining multiple concurrent requests on the same connection but do support sending multiple commands using the new System.Data.Common.DbBatch. I have in mind npgsql (see documentation).

It would be nice to utilize this for the Dapper overloads that accept IEnumerable command parameters (e.g. Execute(...) and ExecuteAsync(...)) to cut down the round trip time. As a bonus, expose some way in the API of grouping commands/parameters to be sent in the same batch. Something like CommandDefinition but with a collection of command text/parameter definitions perhaps?

kmcclellan avatar May 18 '22 20:05 kmcclellan