EF:无法检查模型兼容性,因为数据库不包含模型元数据。


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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM