Code First下迁移数据库更改

第一步:Enable-Migrations -ContextTypeName [你的项目名].[你的数据库上下文] -Force

其中-Force为强制覆盖现有迁移配置

第二步:Add-Migration [随意的迁移名]

第三步:Update-Database

原文地址:https://www.cnblogs.com/huangsheng/p/3580621.html