Reputation: 3150
I've been tasked with speeding up a giant codebase. One of the things I have noticed is that the team uses lazy loading everywhere. So much so that I think there's a lot to be gained by disabling it. There would be too much of an impact if I disabled it entirely so I'd rather do this in phases.
This got me thinking: is there a way (an event?) to detect when EF is doing something lazily?
In case it matters, we're using EF6, but the context is based on ObjectContext
instead of DbContext
.
Due to the mess of the codebase it's not an option to just find references on the navigation properties.
Upvotes: 1
Views: 678
Reputation: 1980
I recommend you to use Glimpse, its a powerful tool for so many things, including EF profiler. You can see how the querys are been translated, and what time each query takes.
Upvotes: 2