Saturday, November 1, 2014

Entity Framework include always load whole collection :- So use Projection instead



The only way to get a collection of parents with a filtered children collection in a single database roundtrip is using a projection. It is not possible to use eager loading (Include) because it doesn't support filtering, Include always loads the whole collection.

No comments: