How to start a Web API project using .NET 5.0 and C#

ZeroesAndOnes
8 min readSep 30, 2021

In this article I will go through a step-by-step example demonstrating how to start a new Web API project using the .NET 5.0 open source framework and C#.

1. Required Software

The applications listed in this section are needed prior to starting this tutorial which will enable us to create the WebAPI project.

One can make the argument that the second application (Postman) is technically not a required app to be installed as there are many different ways to test your API calls. Technically this is true; however Postman has become a very useful tool that it would be almost not beneficial not to use it as it will save you a lot of time.

Btw: Postman is not the only tool that you can use, there are many other application that are similar and you can choose to use them instead however for this tutorial I am choosing to use Postman.

Visual Studio (Link) — Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop computer programs, as well as websites, web apps, web services and mobile apps

Postman (Link) — Postman is the collaboration platform for API development. Postman simplifies each step of building an API and streamlines collaboration so you can create better APIs faster.

If you have Visual Studio and Postman already installed on you machine then you do can skip to the next section.

Note: If you do not have .NET 5.0 installed on your computer please make sure you download it and install it. I will be targeting this Framework .NET 50.
Click here to download .NET 5.0

2. How to create an Empty WebAPI project

In this tutorial I will be using my MacBook Pro, if you are on a windows machine the application might have a slight difference in appearance and location of the menu items however the overall process should not differ. Coding and running of the application is the same on MAC as it is on Windows.

  1. Launch the Visual Studio application and once the application is loaded on you screen, locate the “+New” link and click on it.
Visual Studio 2019 for Mac

--

--