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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -