Best place to enable lazy loading in entity framework 6 -


what best place keep lazyloading enable condition in web application. because when using database first approach of ef , when try update context setting got wiped out. below settings.

  public dbentities(): base("name=dbentities")     {         this.configuration.proxycreationenabled = true;         this.configuration.lazyloadingenabled = true;     } 

what best way these setting should not vanish after edmx update. there chance keep in global.asax. if yes downsides?.

your placement looks fine. note, gert arnold has stated, these defaulted true.

so,

 public dbentities(): base("name=dbentities")     { } 

is need sake of brevity here, excluding explicitness.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -