Visual Studio Code Entity Framework Core Add-Migration not recognized

c# entity-framework-core visual-studio-code

Question

Through the Visual Studio Code Editor, I created an ASP.Net Core Web API application using yoman. I used this tutorial as a guide: here

The API is functional. However, I'm attempting to utilize SQL Server and Entity Framework Core Migrations. In the Visual Studio Code Terminal, I write the following:

Add-Migration MyDbInitialMigration

This is the message I receive:

'Add-Migration' is not recognized as an internal or external command, operable program or batch file.

Having theMicrosoft.EntityFrameworkCore.Tools: 1.1.0-preview4-final installed dependencies I completed this using the Nuget addon for the.Net Core Project Manager.

This command runs successfully in Visual Studio 2015's Package Manager Console.

The issue, in my opinion, is caused by utilizing the Terminal in Visual Studio Code. But does anybody know how to utilize EF Core Migrations directly from the VS Code editor?

I appreciate any support.

Solution

operating thedotnet ef migrations add InitialCreate cmd produced the next error:

No executable found matching command "dotnet-ef"

I had to set up the ensuing dependence AND add it to the tools section in order to fix this.

Microsoft.EntityFrameworkCore.Tools.DotNet
1
19
1/8/2017 7:36:52 PM

Accepted Answer

ZZZ_tmp
36
1/23/2018 3:35:38 PM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow