sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics (you need a .edu or a .ac email address), not free for commercial use. Obtain your licence from
https://www.reversepoco.co.uk/
Other
706 stars 230 forks source link

Add support for memory optimised tables #782

Closed sjh37 closed 1 year ago

sjh37 commented 1 year ago

The first step is ensuring you are on compatibility level >=130. Run this query to find out the current compatibility level:

SELECT compatibility_level FROM sys.databases WHERE name = DB_NAME();

Check if In-Memory OLTP is supported for this server edition and database pricing tier. This has to be 1.

SELECT CAST(SERVERPROPERTY(N'IsXTPSupported') AS BIT) AS IsXTPSupported

Next, list tables where this is switched on:

SELECT SCHEMA_NAME(schema_id) SchemaName, name TableName
FROM sys.tables
WHERE is_memory_optimized = 1;

For any memory-optimised tables

-- EF Core 6
modelBuilder
    .Entity<Blog>()
    .IsMemoryOptimized();

-- EF Core 7
modelBuilder
    .Entity<Blog>()
    .ToTable(b => b.IsMemoryOptimized());

More info microsoft and red-gate and github

sjh37 commented 1 year ago

Completed

sjh37 commented 1 year ago

Released in v3.8.1