Solved

Need to try out Lazy Loading

Posted on 2011-02-17
2
285 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

737 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