简体   繁体   中英

How to automate a models update of my project from my database in a Azure DevOps continuous deployment?

I have a project that uses Entity Framework with Database First approach. Everytime I have an update in the database, I need to manually update the model of my project in the Visual Studio. Like in the image: link image

But that became an issue when the process is authomatized in a deploy process of my aplication. In the deploy process, there is an change in the database of QA to Prod.

How can I include in the steps of my continuous deployment an update to de models from the data base?

How can I include in the steps of my continuous deployment an update to de models from the data base?

If your project targets asp.net core, you can use command-line tool to update your database via command-line task or Powershell task.

Check Entity Framework Core tools reference - .NET Core CLI

They create migrations, apply migrations, and generate code for a model based on an existing database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM