I have entity type Order which has a reference to an entity type Customer. There's a function import that return a list of Order based on a criteria. This list of Orders in displayed in a Datagrid which shows
Order.Date | Order.Customer.Name | Order.Total
For Customer.Name to show up I need to load the CustomerReference in each Order in the list, but each call to Order.CustomerReference.Load() whould make a round trip to the SQL Server and make the whole process very inefficient. The question is, if I have a single query that retrieves all Customer data for all Orders in the list, how do I manually populate the CustomerReference in each Order?
Basically I need to do .Include("Customer") with a function import.
Thanks