Is code first migration automatically run on the server?

.net c# entity-framework entity-framework-6

Accepted Answer

If you're using Azure then you can configure it has automatic process as shown below.

enter image description here

If not, you must do it manually as follows:

You have to create a db script and after that you can run it on your production db.

Script: PM> Update-Database

Refer to this document: How to Get a SQL Script

Another option that I often utilise is:

To conduct migrations against the production database, I modify myconn string to reflect the production database, then execute:

Update-Database (PM)

6
11/3/2016 4:19:32 AM

Popular Answer

ZZZ_tmp


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