如何更新使用实体框架代码优先方法创建的数据库? [英] how can i update database created by using entity framework code first approach?

查看:104
本文介绍了如何更新使用实体框架代码优先方法创建的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是实体框架中的新手.我创建了使用实体框架代码优先方法创建的数据库?并对其进行了更新,它可以正常工作,但问题是它删除了现有数据库并创建了新的.i我想更新现有数据库我尝试使用实体框架代码首先迁移现有数据库,但我们必须使用包管理器控制台,因此听起来更可能是手动步骤.是否有其他方法可以更新数据库?您的帮助对我会有所帮助.谢谢u

I''m new in entity framework.I created database created by using entity framework code first approach?and updated it,it work fine but the problem was it drop the existing database and create new .i wanted to updated existing database without drop it.i tried using entity framework code first igration of an existing database but we got to use package manager console ,so it sound more likely manual steps.is there any other way to update database?ur help wil be helpfull for me.thank u

推荐答案

引用此相似的线程
http://stackoverflow.com/questions/5461512/ef-4-1-code-first-and-existing-database-and-net-membership [
Refer this similar thread
http://stackoverflow.com/questions/5461512/ef-4-1-code-first-and-existing-database-and-net-membership[^]


这篇关于如何更新使用实体框架代码优先方法创建的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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