I wrote the following piece of code using ( NorthwindDataContext context = new NorthwindDataContext ()) { DataLoadOptions loadOptions = new DataLoadOptions (); loadOptions.AssociateWith Customer >(c => c.Orders.Take(5)); context.LoadOptions = loadOptions; var customers = from c in context.Customers select c; foreach ( var c in customers) { foreach ( var o in c.Orders) { Console .WriteLine(o.OrderID); } } } When I run this codeĀ I expect the sql profiler to show me something like this in the first
Read More...