Dapper.Contrib icon indicating copy to clipboard operation
Dapper.Contrib copied to clipboard

Add `List<T> GetMany<T>(List<id>)` to get items with IN clause

Open YarekTyshchenko opened this issue 3 years ago • 1 comments

I need a way to fetch entities with an IN clause, and I'm finding the extensions a bit difficult to extent. My options are implementing a GetMany on all the individual entity stores, duplicate the table name logic from this extension, or just patch this extension to include the method.

For background, Queries with IN clause are needed to implement some GraphQL DataLoader queries, as they batch a bunch of requests by IDs together.

Thoughts?

YarekTyshchenko avatar Nov 29 '21 09:11 YarekTyshchenko

I need a way to fetch entities with an IN clause, and I'm finding the extensions a bit difficult to extent. My options are implementing a GetMany on all the individual entity stores, duplicate the table name logic from this extension, or just patch this extension to include the method.

For background, Queries with IN clause are needed to implement some GraphQL DataLoader queries, as they batch a bunch of requests by IDs together.

Thoughts?

https://github.com/ramoneeza/Rop.Dapper.ContribEx

I'm trying to improve Dapper.Contrib with a lot of new functions.... Alpha, but working... I'll do in the future a nuget repository and a test project.

ramoneeza avatar Jan 25 '22 07:01 ramoneeza