开发者

Prevent EF 4.1 from deleting my database diagram

Is there a wa开发者_运维百科y to prevent Entity Framework Code-First from deleting my database diagrams when it is re-building my database?


Without using DropCreateDatabaseIfModelChanges to create your database you can use SQL Migrations
http://www.hanselman.com/blog/EntityFrameworkCodeFirstMigrationsAlphaNuGetPackageOfTheWeek10.aspx. It won't drop the database and will generate alter commands (Incremental database development) . So you can keep your diagram and existing data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜