Geeks With Blogs
Jeff Krebsbach August 2012 Entries
LINQ to SQL & Entity Framework slow relationships
Lately I've inherited some code written by another company using quite a bit of LINQ to SQL and quite a bit of lazy loading. I changed much of the worst offenders to eager load the relationships I knew I would want, and still felt like the system was slower than I would have expected.A sample of my code:DataContext custom = new DataContext();DataLoadOptions dlo = new DataLoadOptions();custom.De... = false;dlo.LoadWith<Custo... => C.CustomerAddress);custom.D... ......

Posted On Monday, August 6, 2012 5:32 PM

Copyright © jkrebsbach | Powered by: