ObjectState vs System.Data.Entity.EntityState ?

May 22, 2015 at 11:30 PM
Why not use System.Data.Entity.EntityState instead of ObjectState in the FW ?

1/ It would avoid the mapping when using EF. Other persistence FW's could still map when needed
2/ Allow to throw away StateHelper.
3/ Make DataContext class lighter, no more need for all pre & post SyncObjectsStateXyz methods

Thanks for your feedback.
May 27, 2015 at 12:14 AM
  1. mapping is needed or else you will need to include the EF assembly to access System.Data.Entity.EntityState.
  2. StateHelper is needed because #1.
  3. same
One of the design objective's is to minimize the surface area of the ORM (Entity Framework) therefore mapping the state is needed.
Marked as answer by lelong37 on 5/26/2015 at 4:14 PM