This article provides some evidence that disabling AutoDetectChanges in the context of Entity Framework data can provide significant performance improvements when inserting a large number of objects.
context.Configuration.AutoDetectChangesEnabled = false;
However, the DataContext provided by the provider of type SqlEntityConnection does not seem to provide the ability to control this parameter.
There is no context.Configuration property or context.DataContext.Configuration property. There is context.DataContext.ContextOptions , but it has nothing to do with AutoDetectChangesEnabled .
The DataContext property in the context of the type provider is of type System.Data.Objects.ObjectContext . Does anyone know how to affect this particular parameter?
source share