How to totally lock a row in Entity Framework
I am working with a situation where we are dealing with money transactions. For example, I have a table of users wallets, with their balance in that row. UserId; Wallet Id; Balance Now in our website and web services, every time a certain transaction happens, we need to: check that there is enough funds available to perform that transaction: deduct the costs of the transaction from the balance. How and what is the correct way to go about locking that row / entity for the entire duration of my transaction? From what I have read there are some solutions where EF marks an entity and then compares