实体框架4 - 从模型更新数据库架构。如果没有擦桌子数据 [英] Entity Framework 4 - Update database schema from model. Without wiping the table data

查看:127
本文介绍了实体框架4 - 从模型更新数据库架构。如果没有擦桌子数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个新项目,我在使用实体框架4.从模型工作,数据库的方法的奢侈

I'm working on a new project where I have the luxury of working from a Model to Database approach using Entity Framework 4.

我工作的这个项目采取一种灵活的方法,即不同的阶段会随着时间推出。

The project I'm working on is taking an agile approach where different phases will be rolled out over time.

将在我的情况下,模型第一种方法的工作?我注意到当你生成模型库,它再现了从无到有的整个模式,这将明显地擦拭所有在数据库中的数据。

Will the Model First approach work in my case? I noticed when you "Generate Database from Model" it recreates the entire schema from scratch which will obviously wipe all the data that is in the db.

我希望的方式更加从模型更新数据库里的分贝也只是被改变,以反映相当的变化比重建。

I was hoping for a more "Update Database from Model" approach where the db would just be altered to reflect the changes rather than recreated.

有没有人有EF在这种类型的工作流程的工作经验吗?

Does anyone have any experience working in this type of workflow with EF?

谢谢,

詹姆斯·谢尔顿

推荐答案

您想要的<一个href=\"http://blogs.msdn.com/b/adonet/archive/2010/02/08/entity-designer-database-generation-power-pack.aspx\">Database发电包的。

这篇关于实体框架4 - 从模型更新数据库架构。如果没有擦桌子数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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