Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (var ctx = new CustomerContext())
- {
- // 1. SPLIT the queries in multiple smaller queries
- var customers = ctx.Customers
- .Include(x => x.Orders.Select(y => y.Items.Select(z => z.Product))
- .ToList();
- var customers = ctx.Customers
- .Include(x => x.Payments.Select(y => y.Items)
- .ToList();
- var customers = ctx.Customers
- .Include(x => x.Shippings.Select(y => y.Items)
- .ToList();
- // 2. Done!
- }
Add Comment
Please, Sign In to add comment