none
Entity Framework not working with memory optimised tables RRS feed

  • Question

  • Hi,

    I am working on an application developed in .net framework 4.5 ( latest ) using vb.net. Database is SQL server 2016. I am using Entity Framework model first.  All was working fine. Few days ago I decided to change some tables to memory optimised tables. After this change I updated Entity Framework with database. I have a stored procedure and imported that stored procedure into entire framework which updated the values in memory optimised table. I am getting exception when I call this function ( mapped to SP ) . Here is exception text

    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 catch the query with sql profiler. when I run same query in database this works fine. So the issue seems with Entity Framework and memory optimised table compatibility. 

    Can anybody help me. Thanks in advance

    Regards,

    Irfan

    Monday, July 17, 2017 12:58 PM

All replies