Building a web service for logging
Let’s build a minimal web service project that we can then instrument with logging:
- Use your preferred code editor to add a Web API project to the
Chapter05
solution, as defined in the following list:- Project template: ASP.NET Core Web API /
webapi
- Solution file and folder:
Chapter05
- Project file and folder:
Northwind.WebApi
- Authentication type: None
- Configure for HTTPS: Selected
- Enable Docker: Cleared
- Enable OpenAPI support: Selected
- Do not use top-level statements: Cleared
- Use controllers: Cleared
- Enlist in .NET Aspire orchestration: Cleared
- Project template: ASP.NET Core Web API /
- In the project file, treat warnings as errors and reference the data context project that you created in Chapter 1, as shown highlighted in the following markup:
<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework...