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
