efcore.pg
efcore.pg copied to clipboard
Standard AspNetUserRoles table doesn't scaffold correctly. Works in MSSQL
npsql scaffolder doesn't create standard AspNetUserRoles table. Steps to reproduce:
- Create a brand new ASP.NET Core Web-App project
- On the next page, choose Individual Accounts for the Authentication Type
- After creating the application. We need to change the database to Postgres.
- Now we need to recreate the migrations. So we need to delete the existing ones and create brand new ones for Postgres.
- Now we need to update the database with Update-Database.
Once the standard authentication database is created in Postgres, run the scaffold command.
- The AspNetUserRoles table is not created. This only happens if we choose the npgsql entity framework. It works perfectly in mssql.