Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions.

出现这样的错误就需要删除数据库在运行代码即可重新生成数据库。

通常的原因是因为你的数据库中已经存在了部分数据,但是并没y响应的描述数据所造成,注意一下,在数据库中增加了一个名为 EdmMetadata 的表。你可以直接删除原来的数据库,重新运行即可。

 

相关文章:

  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-12-19
  • 2021-11-26
  • 2021-11-03
  • 2022-02-06
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案