Persist the same record by different user

Asked

Viewed 53 times

1

I’ve seen that there’s a way, but I can’t remember how you do it and not a keyword for me to search.

Suppose that distinct users edit the same record, when the last user will persist the information in the database, I want to show a message that this record has already been changed by another user.

Does anyone know how to do it or a keyword so I can search?

1 answer

0

  • Atomicity - Transactions of a transaction will only be persisted (COMMIT) if they are all successfully executed. In case of failure, all transaction operations will be canceled (ROLLBACK).
  • Consistency - Transactions must respect the integrity rules of the bank, such as primary keys, foreign keys, among others, remaining only valid data.
  • Isolation - A transaction cannot be interfered with by competing transactions.
  • Durability - When a transaction is confirmed (COMMIT) the data will be persisted in the database, and can be recovered.

I believe that this is what I need. In case someone, someday seek maybe help.

  • This shop is looking for: https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/handling-concurrency-with-the-entity-frameworkin-an-asp-net-mvc-application

Browser other questions tagged

You are not signed in. Login or sign up in order to post.