Skip to content

Instantly share code, notes, and snippets.

@alexwoollam
Last active April 14, 2021 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexwoollam/09eb37fdffd682738f32b8fe015afbc1 to your computer and use it in GitHub Desktop.
Save alexwoollam/09eb37fdffd682738f32b8fe015afbc1 to your computer and use it in GitHub Desktop.
dotnet cheatsheet
//while in the dir
dotnet new sln
dotnet new webapi -o Project.Api
dotnet new classlib -o Project.Module
//add to solution:
dotnet sln add Project.Api/Project.Api.csproj Project.Core/Project.Core.csproj Project.Data/Project.Data.csproj etc...
//link them:
dotnet add Project.Api/Project.Api.csproj reference Project.Core/Project.Core.csproj etc..
//restore nuget
dotnet restore
//build
dotnet build
//EF
dotnet ef migrations add AddBlogCreatedTimestamp
dotnet ef database update
//watch
dotnet watch run
dotnet watch build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment