We can run the following command that will create the context and models in the project:
Scaffold-DbContext -Connection "Data Source=somedatasource.com;Initial Catalog=mydb;Integrated Security=False;User Id=user;Password=pass;MultipleActiveResultSets=True" -Provider Microsoft.EntityFrameworkCore.SqlServer -Tables PrdSalesRegion -Context SalesRegionContext
How do we specify different output folders for context and tables?
When I attempt to do this:
Scaffold-DbContext -Connection "Data Source=somedatasource.com;Initial Catalog=mydb;Integrated Security=False;User Id=user;Password=pass;MultipleActiveResultSets=True" -Provider Microsoft.EntityFrameworkCore.SqlServer -Tables Models/PrdSalesRegion -Context Context/SalesRegionContext
Note, that the only change is:
-Tables Models/PrdSalesRegion -Context Context/SalesRegionContext
Then I get this output:
The context class name passed in, Context/SalesRegionContext, is not a valid C# identifier.
How do we specify different output folders for context and tables?