How to load in a following EF entities:
image source: http://blogs.microsoft.co.il/blogs/idof/archive/2008/08/20/entity-framework-and-lazy-loading.aspx
Let's say we have address id and we want to load address with person and the pets. How to do that?
We can do that
var address = contex.Addresses.Include("Peson").Where(add => add.Id == GivenId);
But it loads address and person w/o pets.
If I include a pets entity, like this:
var address = contex.Addresses.Include("Peson").Include("Pets").Where(add => add.Id == GivenId);
I get error:
A specified Include path is not valid.
So the question is how to load a whole entity tree.