if we use vscode in development, we can use .net cli to create projects and install libraries.

Prerequisites

.net Core cli

cli commands

display infomation to use the cli

dotnet
1

new a project

dotnet new {project type} {folder name}
1

or you can just

dotnet new
1

to see available options.

add version control (git)

enable version control to folder

  • navigate inside the project folder
git init
1

Replacement of Nuget

dotnet add package {package name} {-v version}

add package to the project

dotnet add package Newtonsoft.Json
dotnet add package Newtonsoft.Json -v 1.0.0
1
2
Restore package

reinstall all package in the project

dotnet restore 
1
remove package

remove package

dotnet remove package {package name}
1

EntityFramework Core Commands

show help
dotnet ef migrations --help
dotnet ef migrations add --help
1
2
Add Migration
dotnet ef migrations add InitialModel
1
Remove Migration
dotnet ef migrations remove
1
Update Database
dotnet ef database update 
1
Revert the database to target migration
dotnet ef database update <target migration>
1
Revert the database to initial state(Delete Everything)
dotnet ef database update 0
1

Publish

dotnet publish
dotnet publish -c {Debug|Release}
1
2
Reference
Common Package for Development