Click here to Skip to main content
13,090,299 members (76,103 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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.
Posted 27-Mar-13 4:44am
DinoRondelly 27-Mar-13 14:15pm
You should use google and investigate on your own. The pros and cons of each should be readily available through a well formatted search. I mean unless you want a bunch of links from someone else who does the search for you.
Chamika Sandamal 27-Mar-13 14:24pm
So you think i'm just asking questions without searching? nop man i searched but i haven't found a valid information as i expected. that's why i ask this question
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Entity framework self tracking is a kind of unit of work.
more link about ef and unit of work
Chamika Sandamal 28-Mar-13 7:47am
yes i know that self tracking is kind of unit of work. that is why i'm asking any purpose of using unit of work instead of self tracking entities.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I have find out your response it is very clear to understand the answer:
1- They are the same when you look thir purpose because they will aply the changes all together to the databse
2- You can prefere Self Tracking because: Self Tracking simply ready to use with a variety of working capasity (Because it has many implemented methods)
3- You can prefere UnitOfWork because: You can add your methods according to your needs as like as RoleBack but also you can add those to the selftracking if you agree current implementation


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 3 Oct 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100