How do I generate automatic migration scripts with model

How do I generate automatic migration scripts with model-first in Entity Framework 4.3 or 5.0?

I've seen plenty of samples with this for code-first, but none that can be used in my scenario.

My problem is that I have a staging environment and a live environment. I may be making many model and database changes to the staging environment before publishing it all to the live environment.

This adds complexity when I then want to generate a migration script from my staging database to my live database.

Is this possible automatically somehow? Can this be achieved through the Entity Framework Power Tools?


Code First Migrations, as you would expect from the name, currently only work with a Code First model. There are other tools, however, that may prove useful for your scenario like SSDT's Schema Compare utility.

链接地址: http://www.djcxy.com/p/90234.html

上一篇: 在实体框架中使用模型优先方法迁移

下一篇: 如何使用模型生成自动迁移脚本