Hi AmirSaleem-3788,
- The recommended way to keep database changes in sync with the generated model is to use migration, that is, make changes to the model first, and then use tools to generate code that propagates the changes to the database.
If you need to re-scaffold the model after database schema changes have been made, you can do so by specifying the -f or --force option. - You can generate a script for the migration.
Here are some related documents you can refer to.
Migrations Overview
Reverse Engineering
Entity Framework Core tools reference - Package Manager Console in Visual Studio
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.