I use code first to design my database. In my server there is a different database. So I want that when I published my new asp.net project to the server, let the database migrate to new version automatically. How can I do that? Which subject should I check?
OK we can do that with the remote database connection string and update-database command from console. But not so, how is it possible by inline the code?

Bhuvanesh MohankumarRank #310 · 8.1K reputationPosted Dec 16, 2016, 10:57 AM EST
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Dec 21, 2016, 7:36 AM EST
Serhat Koroglu17 reputationPosted Dec 21, 2016, 3:34 AM EST