I have tried to scaffold two views from a database in a SQL Server. Code in .Net 5.0.
Scaffold-DbContext "conn-string"
Microsoft.EntityFrameworkCore.SqlServer
-OutputDir Entities -ContextDir .
-Context MyContext -UseDatabaseNames -Force
-NoPluralize -NoOnConfiguring -Tables View1,View2
This runs without error but no entities for this views are generated and I get a message:
Unable to find a table in the database matching the selected table 'View1'.
Unable to find a table in the database matching the selected table 'View2'.
How do I use Scaffold-DbContext
to get these two views?