Type-Safe Entity Framework Include

added by Lear
11/19/2010 8:40:31 AM

0 Kicks, 116 Views

Unlike many ORM solutions MS Entity Framework does not lazy fetch accessed tables. Coming from LINQ to SQL I didn't like this feature at first because it meant adding a bunch of loosely typed include statements to every SQL call. But I quickly realized the performance benefits, not to mention the N+1 problem just goes away. But, I still had heartburn over the loose typing of the include statement, so I came up with my own strongly typed include.


0 comments