Template to create a controller in an ASP.NET Core Web API project.
- Clone this repository
- Install the template
dotnet new -i ./AspnetCoreWebApiController/content
- Go to the controllers folder in your project and use the template
dotnet new webapicontroller -n Cats
- You will see a new file named CatsController.cs with the basic code.
- Check the namespace of this file to adjust to your project.