I recently got a new computer and saw there was a new version of Visual Studio. I tried to Update-Database in Nuget Manager Console but I get this.
The Entity Framework Core commands for the Package Manager Console don't yet support csproj-based .NET Core projects. Use the .NET Command Line Tools (i.e. dotnet ef) instead. For more details, see https://go.microsoft.com/fwlink/?linkid=834381.
I then follow the instructions to use dotnet CLI (never used it before so not sure how to use it) added the tools then restored dotnet as it says. I then enter dotnet ef database update to add the migrations I already have but this comes up:
dotnet : No executable found matching command "dotnet-ef"
At line:1 char:1
- dotnet ef database update
- CategoryInfo : NotSpecified: (No executable f...and "dotnet-ef" :String) [], RemoteException
- FullyQualifiedErrorId : NativeCommandError
I assume that you have added the the ef-tools package to your project.json tools section?
You should have a section that looks like this:
I usually open the nuget package console and type the migration commands there. No need to prefix that command with 'dotnet ef' anymore. That way it is not very different from the EF6 framework experience.
I just found also a good tutorial on the asp.net core website: https://learn.microsoft.com/en-us/ef/core/get-started/aspnetcore/new-db