The cost of eager loading in Entity Framework
Posted by: Julia Lerman Blog - Dont Be Iffy...,
on 30 Mar 2009 |
View original | Bookmarked: 0 time(s)
Everything in life is about choices and usually we have to evaluate our options before
we make those choices. So it goes with eager loading vs. deferred loading in Entity
Framework.
We have the option of eager loading with the Include method and can use it very creatively.
For an entity that has a lot of relationships you could do something like:
context.Customers.Include("Orders.LineItems.Product").Include("Addresses")
.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family:...