async and await are code markers that help us write asynchronous code using TPL. They help maintain the structure of code and make it look synchronous while processing code asynchronously in the background.
We introduced async and await in Chapter 9, Async, Await, and Task-Based Asynchronous Programming Basics.
Now, let's create an asynchronous web API with ASP.NET Core 3.0 and VS 2019 preview. The API will read a file from the server:
- Open Visual Studio 2019 to be presented with the following screen. Create a new ASP.NET Core Web Application project in VS 2019, as shown in the following screenshot:
- Give the project a name and the location where you want it to be created:
- Select the project's type, which in our case is API, and click Create:
- Now, create a new folder in our project called Files and add a file named data...