EF迁移数据库,第一种方法? [英] EF Migrations for Database-first approach?

查看:88
本文介绍了EF迁移数据库,第一种方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用的数据库先用的EntityFramework的方法。
我们已经几个客户,当我们部署新的产品版本,我们现在采用DB模式的变化手动像工具SQL比较

We're using Database first approach with EntityFramework. We've several customers, and when we deploy new product version, we're now applying DB schema changes "manually" with tools like SQL Compare.

有没有办法如何EF迁移有助于将更改应用到客户数据库自动?

Is there a way how EF Migrations could help to apply changes to customers DB automatically?

推荐答案

据我所知,EF迁移是针对CodeFirst产品,不支持数据库优先操作。

As far as I know, EF Migrations is a product targeted at CodeFirst and doesn't support Database First operations.

CodeFirst假定你将永远不会手动进行任何更改到数据库。所有对数据库的修改将通过代码先迁移。

CodeFirst assumes that you will never make any changes manually to the database. All the changes to the database will go through the code first migrations.

这篇关于EF迁移数据库,第一种方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆