add new controller api in asp.net core code example Example: aspnet new api dotnet new webapi -o TodoApi