You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the QueryMultiple operation is type-coupled and even to the parameter passing. Let us say we have classes named Order and OrderItem and we would like to query all the orders and its corresponding order items via order Id, we do the following simple code.
using(varconnection=newSqlConnection(...)){varorderId=10045;varresult=connection.QueryMultiple<Order,OrderItem>(
o =>o.Id==orderId, oi =>oi.OrderId==orderId);varorder=result.Item1.FirstOrDefault();varorderItems=result.Item2.ToList();}
Like with many other operations, it would be better to make it more dynamic by considering the passing of the anonymous types like below.
Describe the enhancement
Currently, the QueryMultiple operation is type-coupled and even to the parameter passing. Let us say we have classes named
Order
andOrderItem
and we would like to query all the orders and its corresponding order items via orderId
, we do the following simple code.Like with many other operations, it would be better to make it more dynamic by considering the passing of the anonymous types like below.
And/or Query Objects (i.e.: QueryField and QueryGroup).
The text was updated successfully, but these errors were encountered: