Isn't there a framework level mechanism that handles all this?I'm almost afraid to respond ;-)
Both DataSets and Entities offer change tracking if you stay connected to the data.
In April 2007, Entities lose change tracking if you disconnect from the data. Typed DataSets keep their change tracking which makes them suitable for passing between tiers for selective updates. I'm very much a student but I can already do a selective update using a typed DataSet.
If you ask on UT whether NET people are using this change tracking, the most common answer is "no". If you ask why, the answer is that change tracking is generally unnecessary and that people are using a pessimistic locking technique.
If I were planning a NET deployment, IMHO I'd be using change tracking all the time with a generic locking facility that can be activated as required. If it had to be done in April 2007 I guess I'd use Typed DataSets, but promised changes for Linq for SQL would make that preferable if people can wait.
That's pretty much the conclusion I've reached after a fairly intensive investigation, so now I'm looking at open source alternatives just as critically before deciding what to do next.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1