EF DbSets with Master.Include("Detail")
Hi there,
Bit of background. Using the ObjectContext in a querying e.g.
Any help would be greatly appreciated.
Thanks
Bit of background. Using the ObjectContext in a querying e.g.
from o in Orders.Include("Orderlines")... select o
LinqPad will output the orders as well as order lines in the result pane. When using DbSet and POCOs LinqPad only outputs the Order properties. Lazyloading is off so I'm not sure what else to try. Any help would be greatly appreciated.
Thanks
Comments
There are a couple of workarounds. One is to select new { o, o.OrderLines }. Another is to use results-to-grids mode, which generates hyperlinks for each association property.
The strange thing is that all "excluded" collections returns (null) in the grid which leads me to think the LINQPad can indeed walk only populated collections without having to hit the DB.