Cannot create a DbSet for 'xxxMinutes' because this type is not included in the model for the context.
後來找了一下xxxMinutes多了一個xxxMinute的Class
原來的
Scaffold-DbContext "Server=192.168.0.1;Database=abc;user id=sa;password=12345678;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Project board.model -UseDatabaseNames -NoOnConfiguring -Force多加一個-NoPluralize停止複數化
多加一個-NoOnConfiguring不產生OnConfiguring
Scaffold-DbContext "Server=192.168.0.1;Database=abc;user id=sa;password=12345678;TrustServerCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Project board.model -UseDatabaseNames -NoOnConfiguring -NoPluralize -Force參考資料
Entity Framework Core tools reference - Package Manager Console in Visual Studio