I'm using entity framework 6 with MVC 5 and trying to enable migration in code first so that I can avoid data loss. But when type the command in package manager console, it throws following error:
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
I checked all duplicates but none of them worked in my case.