'(DB first)I have added one more tables in database after Scaffold. Now trying to add those tables into my model in Entity Framework Core
I have tried it, but it create a master context do not add any new tables into model.
Scaffold-DbContext "Server=localhost;Database=master;Trusted_Connection=True;"
Microsoft.EntityFrameworkCore.SqlServer
-OutputDir Models -Tables OrderDetails -f
Please help.
Solution 1:[1]
In the scaffold command you show, you're scaffolding the Master database. That's probably not your application database, or at least it shouldn't be. Master is a system database, and your application should have its own database.
You could add the new tables manually as EF core model classes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | pjs |
