如何更新使用实体框架代码优先方法创建的数据库?

如何更新使用实体框架代码优先方法创建的数据库?

问题描述:

我是实体框架中的新手.我创建了使用实体框架代码优先方法创建的数据库?并对其进行了更新,它可以正常工作,但问题是它删除了现有数据库并创建了新的.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[^]