MVC 5でエンティティフレームワーク6を使用していて、コードでマイグレーションを有効にしようとしています。しかし、タイプパッケージマネージャコンソールのコマンドは、それが次のエラーをスローした場合:コードfirst Entity Framework 6のマイグレーションエラーを有効にするMVC 5
PM> Enable-Migrations -ContextTypeName [ContextClassName] The term 'Enable-Migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:1 + Enable-Migrations -ContextTypeName [ContextClassName] + ~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Enable-Migration:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
私はすべての重複をチェックするが、それらのどれも私の場合で働いていません。
update-databaseは機能しますか? – Neil
https://stackoverflow.com/a/23154834/4361743 – karman