开发者

Prevent EF 4.1 from deleting my database diagram

开发者 https://www.devze.com 2023-03-30 03:39 出处:网络
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

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

精彩评论

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