Dotnet api linux: Difference between revisions
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
dotnet add package Microsoft.EntityFrameworkCore | dotnet add package Microsoft.EntityFrameworkCore | ||
</syntaxhighlight> | |||
== Install Migration Tool == | |||
Exercise called for using Add-Migration on windows. In Linux this translates to | |||
<syntaxhighlight lang="bash"> | |||
# Install Tool | |||
dotnet add package Microsoft.EntityFrameworkCore.Tools.Dotnet | |||
# Install dotnet-ef | |||
dotnet tool install --global dotnet-ef | |||
# Run Migration Creation | |||
dotnet ef migrations add InitialCreate | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 03:39, 28 July 2020
Set up with VS Code
Create Project
To create a webapi using .net core 3.1 simply type
dotnet new webapi
Restore Nuget Packages
dotnet add package Microsoft.EntityFrameworkCore
Install Migration Tool
Exercise called for using Add-Migration on windows. In Linux this translates to
# Install Tool
dotnet add package Microsoft.EntityFrameworkCore.Tools.Dotnet
# Install dotnet-ef
dotnet tool install --global dotnet-ef
# Run Migration Creation
dotnet ef migrations add InitialCreate