J'utilise entity Framework 6 avec MVC 5 et j'essaie d'activer d'abord la migration dans le code pour éviter les pertes de données. Mais lorsque le type de la commande dans la console de gestionnaire de paquets, il jette l'erreur suivante:Code d'abord Activer l'erreur de migration dans 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
J'ai vérifié tous les doublons, mais aucun d'entre eux travaillaient dans mon cas.
La base de données de mise à jour fonctionne-t-elle? – Neil
https://stackoverflow.com/a/23154834/4361743 – karman