create .net core web api 2019 Cli code example Example 1: dotnet create project command line dotnet new console Example 2: aspnet new api dotnet new webapi -o TodoApi