I set it in the constructor of Context class i.e. this.Configuration.LazyLoadingEnabled = false;
Below is the code snippet.
public partial class PabitraEntities : DbContext
{
public PabitraEntities()
: base("name=PabitraEntities")
{
this.Configuration.LazyLoadingEnabled = false;
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<CountryMaster> CountryMasters { get; set; }
}