Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不丢失数据的情况下更新数据库Code First?我正在开发一个新项目,并且已经对代码中的数据库进行了一些更改。然后它就打动了我,migrations似乎总是丢弃并重新创建您更改的任何内容。
Code First
migrations
这是我在使用该应用程序时不希望发生的事情。
I use Script option, to generate scrpit. i change it to alter table when it tries to drop it:
Update-Database -Script -ProjectName Proj -StartupProjectName Proj