I am currently writing an article on solving ADO.NET DbConcurrencyException automatically with a class I've written (a pet-project of mine called AutoResolver).
Using configuration, and two simple lines of code this class should handle most of the problems. Expect it soon...
_resolver =
new AutoResolver();
_resolver.Attach(ProductsTable, productsAdapter);
Currently the class can solve a concurrent update (on a column per column basis) using:
Last-One-Wins: this means that your column's value is used in the update, overwriting the last change. (How rude!)
Use-Db-Value: this throws away your change, preferring the current value in the database. (You're too nice).
Use-Db-Value-IfUnchanged: this uses the current database's value for a column, on condition you did not change this column in your row. (Usefull)
Merge: this merges the update made to the column in the database with your changes. Usefull for example if the column is some kind of counter. For example if you decrement the value, and another user also decremented the value, merging will update the value with both decrements. (Usefull)
Event: in this case the component uses an event giving you the chance to write some code to do the three-way merge (current row in database, the original value of the row, and your changes).
I could use your help however. What kind of concurrency problems have you faced? What was the hardest one you had? Would you be able to resolve it using one of the above?
So please use the feedback link. Any usefull information will end up in the article and the AutoResolver... So will your name :)
By the way, I've used Team System Unit Testing, and it works great!