Following are the ways to implement locking using ADO.NET :-
3. Check for original values stored in SQL SERVER and actual changed values.In stored procedure check before updating that the old data is same as the current.Example in the below shown SQL before updating field1 we check that is the old field1 value same.If not then some one else has updated and
necessary action has to be taken.
Update table1 set field1=@test where field1 = @oldfield1value
Locking can be handled at ADO.NET side or at SQL SERVER side i.e. in stored procedures.