In EF4, I have a small object map and the volume of data is also small. So for queries I want to eager load all associated data. Is there any single method call that can do the job, like "IQueryable.IncludeEverything()", rather than call Include() repeatedly with hardcoded property names?
In EF4, I have a small object map and the volume of data is
Share
There’s nothing out of the box, but you could use MetadataWorkspace to implement it:
Note that this code is just for illustration. It doesn’t have parameter validation, it may include the same enities several times and it won’t include all the related entities if there are cycles in your model.