SeduceAdmin
SeduceAdmin

Reputation: 45

Entity Framework In Memory on MS SQL Azure

Is it possible to use in memory in Entity Framework on an Azure MS SQL database?

Azure has in memory MS SQL databases: In merory Azure

If it is possible, is there any disadvances?

Upvotes: 4

Views: 560

Answers (1)

Sampath
Sampath

Reputation: 65860

Yes,You can use EF if you'll full fill the below mentioned criteria.

Databases that are at a Premium service tier.

Databases that were created after the In-Memory OLTP features became active.

A new database cannot support In-Memory OLTP if it is restored from a database that was created before the In-Memory OLTP features became active.

Transact-SQL Constructs Not Supported by In-Memory OLTP

Memory-optimized tables, natively compiled stored procedures, and user-defined functions do not support the full Transact-SQL surface area that is supported by disk-based tables, interpreted Transact-SQL stored procedures, and user-defined functions. When attempting to use one of the unsupported features, the server returns an error.

New Features and Enhancements in SQL Server 2016

Support for Multiple Active Result Sets (MARS): In-Memory OLTP now supports MARS using queries and natively compiled stored procedures. This enables requesting data from multiple queries without the need to retrieve each result set before sending the next request. MARS will need to be explicitly enabled in a connection since its disabled by default. With support for MARS, Entity Framework will be easier to implement with In-Memory OLTP.

enter image description here

Is that durable ?

They are fully transactional, durable and can be accessed using T-SQL statements just like the disk-based tables. One version of the table is stored in the active memory and the standard version is stored on the hard disk. Transactions, however, only access data directly from the version in the memory and hence run faster.

Upvotes: 2

Related Questions