I'm currently learning Entity Framework (code-first approach).
- I have created a POCO entity
- Created a context class that inherits from
DbContext
and it exposesDbSet
properties for the types that I want to use to be part of the model In the PowerShell command window inside Visual Studio, I tried:
PM> enable-migrations
Running this command is throwing an error:
The term 'enable-migrations' 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:18
+ enable-migrations <<<<
+ CategoryInfo : ObjectNotFound: (enable-migrations:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I don't know why this happening..
I already tried :
- Restart Visual Studio
- Install and reinstall EF
- Restarting Visual Studio with administrator privilege.