The hidden assumption of EF 4 self-tracking entity recently I was diving into the Entity Framework self-tracking entity T4 and its generated code. doing so I was finding some interesting assumptions made about the entity behaviors. this post will illuminate some of those assumptions. Background EF self tracking entity is one of the major enhancement of EF 4.0 , it is a disconnected model ( similar to the old DataSet ) which enable tracking the entity state ( Added, Modified, Deleted and Unchanged...