c# - EF7 RC2 Code First Create Database -


i'm using ef7 rc2 in asp.net core rc2 application , i'm trying generate db code (i'm using code first). created context, , setup connection string, when enter "add-migration" in nuget console in vs2015, error saying

the term 'add-migration' not recognized name of cmdlet, function, script file, or operable program.

i did digging, , think command rc1 thing. there rc2 equivalent? there tutorials out there ef7 rc2? find rc1 or early.

in regular command prompt new dotnet tooling installed rc2, should able following within project's directory:

dotnet ef migrations add [name] 

as quick note, may want explore new commands see what's in each item. such dotnet vs. dotnet ef(https://blogs.msdn.microsoft.com/dotnet/2016/05/16/announcing-net-core-rc2/)

you may need ensure powershell 5 installed work within package manager console:

https://docs.efproject.net/en/latest/miscellaneous/rc1-rc2-upgrade.html#package-manager-commands-require-powershell-5

you need add project.json file , "microsoft.entityframeworkcore.tools" : "1.0.0-preview1-final" dependencies.

"tools": {   "microsoft.entityframeworkcore.tools": {     "version": "1.0.0-preview1-final",     "imports": [       "portable-net45+win8+dnxcore50",       "portable-net45+win8"     ]   } } 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -