I'm using Entity Framework 6.1.0 with SQL Server 2014.
I'm attempting to perform several operations under a transaction which i've created like this:
(var transaction = context.Database.BeginTransaction())
{
}
But I'm getting an error
Accessing memory optimized tables using the READ COMMITTED isolation level is supported only for autocommit transactions. It is not supported for explicit or implicit transactions. Provide a supported isolation level for the memory optimized table using a table hint, such as WITH (SNAPSHOT).
I have tried all possible isolation levels (those allowed for in memory tables) but to no avail.
How can I perform atomic transactions from code with in memory tables?
The solution was to enable MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT
Resource: http://msdn.microsoft.com/en-us/library/dn133175(v=sql.120).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With