LINQ to SQL, Lazy Loading and Prefetching

Posted by: Rick Strahls WebLog, on 12 Oct 2009 | View original | Bookmarked: 0 time(s)

LINQ to SQL by default loads related entities and entity sets by using Lazy Loading. Which means if you retrieve a list of entities in a query that references other entities these other entities are not actually loaded unless you physically access them. Lazy loading is quite useful in some scenarios typically when you load up individual instances for display purposes in simple record based UIs, but it can be a real problem when displaying list based data that needs to have access to related data....

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2242 | Hits: 279

Similar Posts

  • EF4: Lazy Loading on By Default but what about pre Beta 2 Models? more
  • NHibernate : Some Naked Thoughts more
  • A Look at Lazy Loading in EF4 more
  • LINQ Deep Dive: great LINQ tips more
  • OleDb Parameters to access FoxPro Data from .NET more
  • date validations more
  • Athena - A LINQ to flickr API (Release 1.4) more
  • Looking at EF Performance - some surprises more
  • what I miss in LINQdatasource more
  • Rob's Not So Lazy MVC Storefront more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD