Entity Framework Code First: Always disable AutoDetectChanges when importing data

1 01 2013

This post is no longer maintained. Click here for the updated version of this post





3 responses

2 01 2013
The Morning Brew - Chris Alcock » The Morning Brew #1264

[…] Entity Framework Code First: Always disable AutoDetectChanges when importing data – Matteo Tontini highlights the importance of disabling automatic change tracking in Entity Framework (and also applies to other ORMs too) when performing build insertions using the ORM to avoid substantial performance penalties as the ORM attempts to keep track of large number of entities and scan them for changes. […]

19 01 2014
Anatoly Ukhvanov

Thanks, this article was very useful for me!
I’m trying to find an answer to a similar question:
You’re talking about the difference of calling Add method with AutoDetectChanges enabled or disabled, and my question is about the difference when calling Find method (which invokes DetectChanges too — I don’t understand why). Could you please help me and answer my question?
P. S. Excuse me my English: it’s not my native language. 🙂

30 03 2015

I see you have renewed https://ilmatte.wordpress.com/2013/01/01/entity-framework-code-first-always-disable-autodetectchanges-when-importing-data/ for a while, is that for search engine optimisation?
Posted this to my wall, very good!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: