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.
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. 😄
I think it'd be much more convenient if we were able to pass a
Type[]
as a parameter to aGet()
method. Right now building queries with variable includes results in a unnecessary large amount of code.MultiMap
already passes an array of types toBuildMultiMapQuery
, 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.