Search code examples
wcfentity-framework-5unit-of-workself-tracking-entities

Difference between Entity framework self tracking entities vs Unit of work


What is the difference between using Entity framework self tracking entities and implementing Unit of work architecture? As i understand both are keep tracking of the objects, one db call for commit changes. So i cant figure out the difference of those. can some one point me about what should used in which case? I'm using entity framework 5 with WCF service application.


Solution

  • According to the MSDN, Self Tracking Entities are no longer Recommended

    STEs No Longer Recommended

    We no longer recommend using the STE template, it continues to be available to support existing applications. Visit the N-Tier page for other options we recommend for N-Tier scenarios.

    http://msdn.microsoft.com/en-us/data/jj613924.aspx