Entity Framework Change Tracking
I needed to know how the Entity Framework does its change tracking, so I wrote a simple test to see what’s happening. Since we only needed to know what happened when you modify a property on an entity, I focused on that aspect (and not how deleting entities is tracked, for example).
Anyway: my conclusions… It seems that the Entity Framework sets the EntityState of an entity to Modified anytime you change a property. It does not matter what value you put in it.
To put this in a small list. The Modified state appears…
- … when you assign a different value (obviously)
- … when you assign a different value and then assign the previous value
- … when you assign the same value
About this entry
You’re currently reading “Entity Framework Change Tracking,” an entry on Inferis’ Code Dump
- Published:
- 27.08.09 / 9am
- Category:
- entity-framework
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]