Hi, please is there a way to do path prefetch for a query containing aggregate, for example I have these 2 tables
CustomerTable(CustomerId, OrderId, OrderDate)
OderDetails(OrderId, Status)
and the query to retrieve customers and their newest order:
var q = from c in metaData.Customer
group c by c.CustomerId into g
let maxDate = g.Max(c => c.OrderDate)
select g.Where(c => c.OrderDate == maxDate);
I would like to prefetch the OrderDetail using the same query for each selected customer/latest order.
Many thanks