In scenarios when you want to retrieve referenced objects in a single query, where there is a 1 to many relationship, you have to set ParallelFetch to True on your query definition. For example, if you want to get an Order object and have the OrderDetail objects for that Order pre-loaded in a single query, then your code should look like the code-snippet below:
C# |
Copy Code |
var query = from o in objectScope.Extent<Order>().ParallelFetch(true) where ... select o; |
See Also