Deep Dive into Dependency Injection
In this chapter, we explore the ASP.NET Core Dependency Injection (DI) system and how to leverage it efficiently, along with its limits and its capabilities. We also cover how to compose objects using DI, the meaning of inversion of control, and how to use the built-in DI container. We cover the concepts behind DI, too, and we also revisit our first three GoF design patterns using DI. This chapter is crucial to your journey into modern application design.
The following topics will be covered in this chapter:
- What is dependency injection?
- Revisiting the Strategy pattern
- Revisiting the Singleton pattern
- Understanding the Service Locator pattern
- Revisiting the Factory pattern