semaphore for a datarow
<p>I am writing a web application that allows the user basic CRUD operations against a database.   The tables that are being updated have less than 200 records and there may be multiple users using this applications there is a need for some sort of locking mechanism to avoid the 2 users from overwriting each others changes.</p>

<p>I have looked into semaphores but that seems to only limit the number of users executing the same code.  In my data layer I have a class file for each table so I can certainly employ this on a specific table's class file but can I somehow limit the locking to the key fields?</p>
