شبیه سازی Row level locking در Entity Framework
using (var scope = new TransactionScope(...)) { using (var context = new YourContext(...)) { var wallet = context.ExecuteStoreQuery<UserWallet>("SELECT UserId, WalletId, Balance FROM UserWallets WITH (UPDLOCK) WHERE ..."); // your logic scope.Complete(); } }