?
Solved

Need to try out Lazy Loading

Posted on 2011-02-17
2
Medium Priority
?
287 Views
Last Modified: 2012-05-11
I have not used Lazy Loading, unless it's the default with Entity Framework 4.0. I use L2E.

Pllease tell me about how to know if I use Lazy Loading and how to configure it if I do not. Also, what are the pitfalls?

Thanks,
newbieweb

0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 34916049
Lazy loading is on by default. You can force loading of dependent entities by using the Include() method in your LINQ query if needed, by explicitly calling Load() on the child collection.

Further reading:

    http://www.singingeels.com/Articles/Entity_Framework_and_Lazy_Loading.aspx
0
 

Author Closing Comment

by:newbieweb
ID: 34916414
Thanks.
0

Featured Post

Setting up LaraDock for Laravel

Learn how to set up LaraDock in a Laravel project - LaraDock gives us an easy way to run a Laravel application using Docker in a single command.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question