Reputation: 1551
How can I handle concurrency issues for an asp.net 4.5 web application (VS2012 and C#, SQL Server)
For example:
My scenario is a user might have a chance that is never able to process a queue item. See the following:
That will not be ideal for the user A, even though the percentage of this possibility could be really small
I am using transactions at the C# code level as well as at the SQL Server stored procedure level. Also I make use of ADO.net to communicate with database
My questions are:
Upvotes: 3
Views: 3354
Reputation: 5843
In short: You may resolve concurrency issues by using traditional method called timestamp column.
The timestamp column of a table can be used to determine whether any value in the table row has changed since the last time the table was read. This article describes a way to use the timestamp column of a table for optimistic concurrency control in Microsoft SQL Server 2005.
To get more detailed explanation of this approach, follow this article
In addition, you may also look at step-by-step implementation guidelines of Implementing Optimistic Concurrency with SQL Timestamps.
Upvotes: 2