【问题标题】:"model backing the context has changed since the database was created" error [duplicate]“自创建数据库以来支持上下文的模型已更改”错误[重复]
【发布时间】:2018-11-14 12:10:53
【问题描述】:

请帮助我如何解决 MVC 模型中的以下错误。

The model backing the 'ApplicationDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).

【问题讨论】:

    标签: asp.net-mvc c#-4.0


    【解决方案1】:

    由于您在数据库中更改而不是在 ApplicationDbContext 中导致的此错误

    解决这个错误:

    转到 Nuget 包管理器控制台并触发 Update-Database 命令。

    在此之后重建项目

    希望这会奏效

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-19
      • 2011-04-05
      • 2015-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多