且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

实体框架代码优先迁移保留现有数据

更新时间:2022-11-04 23:25:55

是的,但是,根据具体情况(更改的复杂性),它可能会很复杂:

Yes, however, it can be complicated depending on specific case (on complexity of changes):

概述: https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/existing-database

阅读此内容: https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/index

然后执行以下操作: https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/teams

更新:根据重定向更新了链接.

Update: updated the links based on redirects.