

NET Transactions along with EntityFramework That behavior is actually cool and very useful, right? transaction.Complete() actually finishes the database transaction and your data is saved.

The database.SaveChanges() call sends your changes to the database and executes them but they are not really persisted because you are in the database transaction scope.
#Set read committed snapshot on hangs update#
DBC: update User set Age = 28 where Id = 2 DBC: update User set Name = "Admin" where Id = 1 If you are using the Entity Framework during an opened TransactionScope, EntityFramework will open a new Transaction right with the next command that will be sent to the Database ( CRUD Operation).Ĭonsider this code block: using (var transaction = new ()) NET Transaction itself is not connected with the database by any means. NET Transaction can be used in different ways by different frameworks to support transactions. If this isolation is not provided, the program's outcome are possibly erroneous.
