Just like previous chapters, we can start by creating a new project using the web API template. Let's open the terminal and execute the following commands:
mkdir Catalog.API
cd Catalog.API
dotnet new sln -n Catalog.API
mkdir src
cd src
dotnet new webapi -n Catalog.API
dotnet sln ../Catalog.API.sln add Catalog.API
The first dotnet new command creates a new solution file named Catalog.API. The second dotnet new instruction creates a new web API project in the src folder. Finally, the last dotnet sln command adds the project to our solution.
The resulting filesystem structure looks like the following:
.
├── Catalog.API.sln
├── src
│ ├── Catalog.API
│ │ ├── Controllers
│ │ ├── Program.cs
│ │ ├...