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

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: