Entity Framework 4 - Update database schema from model. Without wiping the table data

核能气质少年 提交于 2019-11-26 11:06:34

问题


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.

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

Thanks,

James Sheldon


回答1:


You want the "Database Generation Power Pack."



来源:https://stackoverflow.com/questions/3144117/entity-framework-4-update-database-schema-from-model-without-wiping-the-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!