How can I add tables in EF Core/database first in the package manager console?

ef-core-2.0 entity-framework-core

Question

I'm using EF Core and was able to scaffold the initial database and table:

Scaffold-DbContext "connection-string" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Tables TestTable

But I can't seem to find out how to add tables after the initial scaffold.

1
3
3/13/2018 6:07:29 PM

Accepted Answer

Run the command again to update the DbContext. You could make a bat file to run the command for you. That would make it a bit easier in the long run

1
2/23/2018 5:28:18 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow