Posts Tagged ‘EntityFramework LazyLoading DesignPattern’

Lazy in C#, Lazy Loading, Eager Loading and Explicit Loading in Entity Framework

August 12, 2011

Lazy in C#;

In C# 4.0 a new type was introduced to support Lazy Loading. This helper type is great for types that require a long time to initialize.

Example:

new Car();

we can do

new Lazy();

This means that the CLR will load the type when a property is actually accessed.

About Lazy Loading, Eager Loading and Explicit Loading, here is a nice article:

http://weblogs.asp.net/dotnetstories/archive/2011/03/10/lazy-loading-eager-loading-explicit-loading-in-entity-framework-4.aspx