Description
In this course, you will learn :
- What is the Microsoft Dependency Injection Container, and how does it work?
- What exactly is the Dependency Inversion Principle?
- What exactly are Service Lifetimes? How Do We Handle Interpersonal Relationships?
- When Are Transient, Scoped, and Singleton Lifetimes Used?
Syllabus :
1. Registering First Service
- Dependency Injection - Why Should I Use It?
- Coding Interface
- Constructor Injection
- Register First Service
- What Were The Benefits of Dependency Injection Container?
2. Microsoft Dependency Injection Container & Service Lifetimes
- Introduce - Microsoft Dependency Injection Container
- How Do I Access the Configuration File from the Controller?
- Service Lifetimes
- Transient Services
- Singleton Services
- Scoped Services
- Managing Service Lifetimes of Dependencies (Avoiding Captive Dependencies)
3. Complex Service Register Operations
- Add vs TryAdd & Registering An Interface Multiple Times
- Replacing & Removing Operations in Registered Services, Why Do We Use It?
- Use of Implementation Factories
- Registering Open Generics Services
- Clean Code With Extension Methods
4. What is Injection? What are the Injection Types? & Resolving Dependencies
- Sevice Resolution Mechanisms
- Constructor Injection
- Action Injection
- Injecting Services into Middleware
- Injecting Services into Razor View
- Creating & Using Scopes