The following context parameters should be added to the .tt setting.
- context.Configuration.AutoDetectChangesEnabled = true | false
- context.Configuration.ProxyCreationEnabled = true | false
- context.Configuration.LazyLoadingEnabled = true | fals
Comments: In your .tt settings file, set __MakeClassesPartial = true;__ Then create your own partial class of your db context, which will not be over-written by the generator. For example __public partial class MyDbContext : DbContext, IMyDbContext__ Then implement the __InitializePartial__ function to set your flags, such as AutoDetectChangesEnabled, ProxyCreationEnabled, LazyLoadingEnabled.
- context.Configuration.AutoDetectChangesEnabled = true | false
- context.Configuration.ProxyCreationEnabled = true | false
- context.Configuration.LazyLoadingEnabled = true | fals
Comments: In your .tt settings file, set __MakeClassesPartial = true;__ Then create your own partial class of your db context, which will not be over-written by the generator. For example __public partial class MyDbContext : DbContext, IMyDbContext__ Then implement the __InitializePartial__ function to set your flags, such as AutoDetectChangesEnabled, ProxyCreationEnabled, LazyLoadingEnabled.