Reputation: 350
I have made changes to my existing database, and I want these changes to be reflected in my code.
In earlier version of the entity framework, I would do an "Update from database".
I have read a lot about migrations, but they all seem to show me how to do an initial migration.
So how can i update my code base with changes in my database?
Upvotes: 2
Views: 125
Reputation: 12304
EF Core does not support the database first model as discussed many places including here and here.
If you follow the code first model with EF Core, you could get initial models by reverse engineering the database as described here. Then you would use migrations to update your database from there on as described here.
If you prefer a data-centric approach you might consider database projects to maintain the schema. You would need to manually keep the models in sync, but you could reverse engineer individual tables to mitigate the issues.
Upvotes: 3