Skip to main content

The Lazy Loading in .NET Entity Framework

We did some web service testing based on SQL Server, they all worked well. However, after move to oracle, they all failed.

After adding below codes,  they all works.
_context.ContextOptions.LazyLoadingEnabled = false;

Notice the reason could be entity framework has different behavior. In SQL Server, eager loading by default. In Oracle, Lazy loading by default.

Sigh :(

Comments