DennyDotNet

Awesome ASP.NET C# and other cool coding stuff

About the author

Denny Ferrassoli
Developer at Casting Networks. MCP / .NET
E-mail me Send mail
Add to Technorati Favorites

Recent posts

Recent comments

Authors

Categories

None


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Entity Framework (EF) and Lazy Loading

I came across a great article today that explains a little about Entity Framework's (EF) default lazy load settings. At first you may be confused as to why they decided to default to lazy loading relationship objects but if you take a good look it makes sense.

The team behind EF didn't want this *automatic* behavior happening. The reason behind this decision is simple: When architecting a larger project, it is highly important for developers to clearly understand when they are accessing certain resources, such as the database.

You can run into a boat-load of performance/scalability issues if you are not aware of what relationships are being loaded using LINQ to SQL. EF tries to eliminate this issue by defaulting to lazy loading. Read the article for a great example and explanation.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by Denny on Monday, April 28, 2008 9:07 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Comments

Comments are closed