Getting Started with API Template Pack
Creating a resilient, stable and secure REST API’s is a difficult task, and many of the tasks you’ll need to perform are quite repetitive and can be error prone if completed incorrectly. The API Template pack aims to minimise the need to carry out these tasks, enabling you to only focus on the tasks that add real business value quickly.
The API Template Pack is available as a Custom template for
dotnet new via a nuget package.
Custom templates enable you to install from a NuGet package on any NuGet feed, by referencing a NuGet
.nupkg file directly, or by specifying a file system directory that contains the template.
To install the API Template Pack you can simply do so by opening a terminal window and executing the following dotnet new command line.
dotnet new -i Threenine.ApiProject
This will install a number of Solution, Project and Item templates that you can then use to generate the items you would like to use.
Once the API Template pack is successfully installed you should be able to use the
dotnet new -l to list the options that will now be available.
Should for you for whatever reason need to uninstall the API Template pack this can be achieved by simply executing
dotnet new -u Threenine.ApiProject
The video below will guide you throught the process of Installing and Uninstalling the API Template Pack.
Table of contents
- API Solution Template
- API Project Template
- Basic Crud Endpoints
- Domain Generation template
- Model Configuration Generation
- Command endpoint
- Query endpoint
- Database project template