Thursday, October 03, 2013

entity framework - loading related entities in separate queries

Load method, in Entity Framework, is used to load the data into the context. This is handy when preloading all required data for later processing.
When loading data like this, Entity Framework will also understand the links between entities loaded in the context. Therefore it is possible to have several queries to load related data, using Where function, and the navigational properties between loaded related entities will work correctly.

Some useful references:

entity framework - Loading related entities in separate queries and sorting of children collection - Stack Overflow

The Load Method

No comments: