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

 

posted @ 2016-08-09 22:20  taony  阅读(2636)  评论(0编辑  收藏  举报