Last week, Microsoft released Entity Framework Core 5.0 RC1, the first “go live” release of the framework before its official debut in November, together with .NET 5. EF Core is an object-database mapper for .NET, allowing developers to work with a database using .NET objects.

This release candidate contains all features planned for EF Core 5.0. The new features include fully transparent many-to-many mapping, table-per-type inheritance, entity-to-query mapping, support to filtered and split includes, required one-to-one dependents, general query enhancements, and overall improvements in performance, migrations, and deployment experience.

Many-to-many is the most requested feature on EF Core’s backlog. EF Core 5.0 now supports many-to-many relationships without explicitly mapping the join table: when Migrations (or EnsureCreated) are used to create the database, the join table is automatically created.

Property-bag entity types are also part of the many-to-many improvements, allowing a standard CLR type to be used for entity instances such that an explicit CLR type is not needed for each entity type. With this feature, a Dictionary can be used as an entity type - and ultimately as a shared-type entity type, mapped to multiple different entity types.

Another critical feature in the new version is table-per-type (TPT) mapping, which uses a separate table in the database to maintain data for each entity type in an inheritance hierarchy. This particular issue was opened as “a very important feature for EF to be accepted for developing DDD applications,” and it is available since EF Core 5.0 Preview 8.

#entity-framework #dotnet #microsoft

Microsoft Releases Entity Framework Core 5.0 RC 1
4.25 GEEK