Hi, Sometimes I need a data like below: NorthwindDataContext db = new NorthwindDataContext(); DataLoadOptions loadOptions = new DataLoadOptions(); loadOptions.LoadWith(c => c.Orders); loadOptions.LoadWith(o => o.OrderDetails); db.LoadOptions = loadOptions; foreach (Customer item in db.Customers) { // needed data. Console.WriteLine(item.ContactName +" Order Count"+item.Orders.Count+" "+ item.Orders[0].Order_Details.Count()); } What is happeng here is that Orders are prefetched with customer. But,
Read More...