Search code examples
.netentity-frameworkorm

Entity Framework 4 - Delay Loading Expensive Fields


I know this same question was asked for Entity Framework 1, but now that Entity Framework 4 has come out, and Microsoft claims that it provides all of the features of Linq to Sql + more, does Entity Framework now support lazy loading expensive properties? In Linq to Sql, this is extremely easy. There's a Delay Loaded option on any property (accessible through the Designer) that can simply be toggled on or off. Is there something similar in Entity Framework?

Thanks


Solution

  • I've asked the question here on the MS EF forum. As you see they provided a link to a description of Table splitting in Entity Framework.

    Basically the idea is to split one database table into more than one Entity which are associated by 1:1 relationships and then benefit from the usual lazy loading feature between related entities.

    Not as comfortable as the delayed-loading-flag in LINQ to SQL in my opinion but at least a solution which does not require to touch your database table.

    Edit: Finally MS support answered in the thread I've linked above that a "Delayed loading flag" like in LINQ to SQL definitely doesn't exist in Entity Framework.