Dependency Injection in a Minimal API Project
In this chapter of the book, we will discuss some basic topics of minimal APIs in .NET 6.0. We will learn how they differ from the controller-based Web APIs that we were used to using in the previous version of .NET. We will also try to underline the pros and the cons of this new approach of writing APIs.
In this chapter, we will be covering the following topics:
- What is dependency injection?
- Implementing dependency injection in a minimal API project