This is my own notes on doing optimistic concurrency checks with Linq to SQL in an ASP.NET application.

For total newbies there’s a short intro to concurrency problems here

The docs about how to actually do the checks are pretty good IMHO:

Data Retrieval and CUD Operations in N-Tier Applications (LINQ to SQL)

Of course the simplest way of actually telling which version a database row is is the “rowversion” column type:

SQLServer docs on rowversion

Digging deeper, Linq to SQL is integrated with Transactions in .NET (and Windows):

Transactions and Linq to SQL

Advertisements