I want two users to accidentally overwrite each other when updating a record. That is, two users load a page with an A record on it. The user updates the record to AB, and the second user updates it to AC.
I do not want the latter to hit the database in order to override it. I need a mechanism to say that the record has been updated so that your data cannot be saved.
Now the two ideas that I have are time to seal the notes and check this out. If this does not match, do not allow the update. The second way: GUID records every time an update is performed, check the GUID and if it does not match, do not update.
Are these methods valid, if so, which is better. If not, what do you offer. This is in C # if it matters
thanks
source share