Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations.

无法检查模型兼容性,因为数据库不包含模型元数据。模型兼容性只能检查使用代码第一或代码第一迁移所创建的数据库。

解决办法:

在Visual Studio中打开“程序管理控制台”

PM> Enable-Migrations

PM> Update-Database -Force

 

相关文章:

  • 2022-01-10
  • 2021-04-21
  • 2021-08-09
  • 2021-11-27
  • 2021-11-27
  • 2022-01-11
  • 2021-06-01
  • 2021-10-01
猜你喜欢
  • 2021-12-30
  • 2022-12-23
  • 2021-08-11
  • 2021-08-21
  • 2021-04-21
  • 2021-06-03
  • 2021-08-20
相关资源
相似解决方案