Being able to use Type[] as a parameter when using multimapping
Jlll1 opened this issue · 1 comments
Jlll1 commented
I think it'd be much more convenient if we were able to pass a Type[]
as a parameter to a Get()
method. Right now building queries with variable includes results in a unnecessary large amount of code. MultiMap
already passes an array of types to BuildMultiMapQuery
, so if there was an overload where you could do something like:
var includeTypes = new[] { typeof(T1), typeof(T2) };
connection.GetAll<ReturnType>(includeTypes);
it would make it much easier to work with.
I could submit a PR if you'd like.
henkmollema commented
I'm not sure we should add this, perhaps calling Dapper directly is better in this case. Can you create a (simple) PR which demonstrates what this would look like? Perhaps I can be convinced otherwise. 😄