Skip to content

Instantly share code, notes, and snippets.

@aikmeng
Created May 8, 2014 16:38
Show Gist options
  • Save aikmeng/5762e1675ede54d89a60 to your computer and use it in GitHub Desktop.
Save aikmeng/5762e1675ede54d89a60 to your computer and use it in GitHub Desktop.
How to disable lazy loading in entity framework
public class CustomDBContext : DbContext
{
public CustomDBContext()
{
this.Configuration.LazyLoadingEnabled = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment