8
Shouts

Entity Framework 4.0: Creating objects of correct type when using lazy loading

published 1158 days, 19 hours, 23 minutes ago posted by gpeipmangpeipman 1160 days, 8 hours, 14 minutes ago
Monday, March 22, 2010 1:05:50 PM GMT Sunday, March 21, 2010 12:14:17 AM GMT

In my posting about Entity Framework 4.0 and POCOs I introduced lazy loading in EF applications. EF uses proxy classes for lazy loading and this means we have new types in that come and go dynamically in runtime. We don’t have these types available when we write code but we cannot forget that EF may expect us to use dynamically generated types. In this posting I will give you simple hint how to use correct types in your code.

category: How To | clicked: 2 | | source: weblogs.asp.net | show counter code
tags: entity framework 4.0