Entity Framework: How to disable lazy loading for specific query?

set the following code before the query you want to execute

context.Configuration.LazyLoadingEnabled = false;

Leave a Comment