Entity Framework Core 6 will not scaffold a model for ‘pure’ many-many tables

From Entity Framework Core 6 pure many-many tables (eg. those without columns other than FKs) will not be scaffolded into C# classes when using the database first approach.

This allows for easier traversing of a relationship from one side to the other and produces less clutter in our models folder…

The underlying relationships will still be configured in the background via Fluent API configuration and will look similar to below..

Note this is a breaking change…
Breaking changes in EF Core 6.0 – EF Core | Microsoft Docs

Leave a Reply

Your email address will not be published.