SQL Server 2014 in memory table and transactions

I am using Entity Framework 6.1.0 with SQL Server 2014.

I am trying to perform several operations under a transaction that I created as follows:

(var transaction = context.Database.BeginTransaction())
{


}

But I get an error

Access to optimized memory tables using the READ COMMITTED isolation level is only supported for autocommit transactions. It is not supported for explicit or implicit transactions. Provide a supported isolation level for a memory-optimized table using a table hint such as WITH (SNAPSHOT).

I tried all possible isolation levels (which are allowed in the memory tables), but to no avail.

How can I perform atomic transactions from code with memory tables?

+4
1
+2

Source: https://habr.com/ru/post/1537847/


All Articles