Dependency injection beyond the basics
Compared to other courses on the subject of Dependency Injection in .NET, this course was carefully crafted to be a guided experience from the very basics of dependency injection, to some of the most advanced concepts that you might need to deal with in your day to day job.
Dependency injection in .NET is so much more than simply injecting a service from the constructor of a class. It can help you decouple your code, add behavior in elegant ways and ultimately lead to cleaner code beyond the concept of dependency injection itself.
Just to give you an idea of how deep this course goes, we will wrap it up with creating our very own dependency injection framework.
Curriculum
Available in
days
days
after you enroll
Available in
days
days
after you enroll
- The problem with dependencies (6:47)
- Why Dependency injection is necessary (5:13)
- A practical example of the dependency problem (10:25)
- A less obvious example of a Dependency Injection use-case (4:24)
- Dependency injection benefits past testability (1:11)
- Injecting Classes vs Abstract classes vs Interfaces (1:51)
- So do you have to do all that manually?? (1:21)
- Section recap (1:09)
Available in
days
days
after you enroll
- Introduction (0:38)
- The simplest setup with Dependency Injection (6:34)
- The ServiceCollection (2:00)
- The ServiceProvider (1:46)
- All of the above, in an API (5:27)
- The different types of dependency lifetimes (4:30)
- The Transient lifetime (2:08)
- The Singleton lifetime (2:08)
- The Scoped lifetime (2:31)
- GetService vs GetRequiredService (3:38)
- Generic-based registration vs implementation-based registration (3:31)
- Registration approaches (6:04)
- The Startup.cs and changes after .NET 6 (2:09)
- Third party libraries (1:49)
- Section recap (1:09)
Available in
days
days
after you enroll
- Resolving dependencies in different project types (0:21)
- Resolving dependencies from the constructor (0:59)
- Resolving dependencies from the method (1:27)
- Resolving dependencies in a console setup (1:17)
- Resolving dependencies from the HttpContext (1:09)
- Resolving dependencies from Action Filters as Attributes (2:42)
- Resolving dependencies from Service Filters (2:42)
- Resolving dependencies from Middleware (2:32)
- Resolving dependencies in Minimal APIs (3:13)
- Resolving dependencies in Razor Views & Pages (1:28)
- Resolving dependencies in Blazor (1:00)
- Resolving dependencies in gRPC Services (1:16)
- Resolving dependencies in Hosted Services (2:38)
- Resolving dependencies in service registration (1:54)
- Section recap (0:31)
Available in
days
days
after you enroll
- Do you need an interface for everything? (4:59)
- Choosing the right dependency lifetime (2:31)
- Dependency resolving issues and limitations (7:43)
- Registering open generics (2:38)
- Registering multiple interface implementations (3:22)
- The ServiceDescriptor (4:22)
- Add vs TryAdd (4:22)
- TryAddEnumerable (3:31)
- Replacing dependencies (5:47)
- Cleaning up service registration (3:22)
- Section recap (0:59)
Available in
days
days
after you enroll
Available in
days
days
after you enroll
- What is Scrutor? (1:34)
- Registering service decorators (3:58)
- Surprise optional refactoring lecture (8:26)
- Service registration by scanning (13:09)
- Interface marking (3:28)
- Attribute marking (3:13)
- Namespace filtering (2:19)
- Using the ServiceDescriptor attribute (2:47)
- Using RegistrationStrategies (2:24)
- Potential pitfalls (1:52)
- Section recap (0:46)
Available in
days
days
after you enroll
Available in
days
days
after you enroll