Friday, October 20, 2017

AutoDetectChangesEnabled in Entity Framework

You may manually turn this off like so:

context.Configuration.AutoDetectChangesEnabled = false;

 
 

There is not really a good reason to do so. Maybe one use case might be in the name of performance in the short term when churning on something heavy, but in that case you will want to turn this stuff back on after the fact.

context.Configuration.AutoDetectChangesEnabled = true;

No comments:

Post a Comment