The WFA
Throughout this chapter, we will be using an ASP.NET Web API application in our learning process. We will be refactoring all the code in this application to enable DI. Then, in Chapter 3, Getting Started with Unit Testing, we will apply unit tests on the refactored application.
When a new ASP.NET Web API application is created, it comes with a sample random weather forecaster. The application in this chapter will build on top of the original weather sample and will add a real weather forecasting capability to the existing random one. We will creatively call our application the WFA.
The first step is going to be creating a WFA application and making sure it is running.
Creating a sample weather forecaster
To create a sample application, navigate your console to the directory where you want to create this application and execute the following commands:
md UqsWeather cd UqsWeather dotnet new sln dotnet new webapi -o Uqs.Weather -f net6.0 dotnet sln add Uqs.Weather...