.NET Core Dependency Injection From Start to Finish
Create modern, resilient applications!
What you'll work with
About this course
How do you make use of dependency injection so your apps are not half-baked, tightly-coupled, and messy?
.NET Core Dependency Injection from Start to Finish gives you an in-depth look at how the dependency injection system works in .NET Core. It covers how to set it up in all major project types, how to add dependencies in various manners, and how to get the dependencies out. Advanced and edge cases will be covered, including additional parameters, multiple dependencies per interface, dependencies from other libraries, and more.
What you'll be able to do
- Configure dependency injection properly
- Use dependency injection in most projects
- Apply industry best practices
- Handle advanced configuration designs
Every lesson, in the open
45 lessons · 5 hours of video. Here's exactly what's inside.
- 1
Course Introduction
- Introduction 0:52
- What is Dependency Injection 19:16
- Why is Dependency Injection important 4:59
- What This Course Covers 7:09
- What This Course Does Not Cover 3:16
- Who This Course is for 4:24
- 2
The Basics
- Introduction 0:57
- Creating a Blazor Server Project 4:47
- Reviewing Startup 8:13
- Creating a Demo Class 1:59
- Adding a Class to Dependency Injection 1:43
- Referencing a DI Object in a Blazor Page 5:26
- Referencing a DI Object in Another Class 12:16
- 3
Scope
- Introduction 0:35
- Transient 2:15
- Singleton 5:16
- Scoped 5:20
- 4
Using Interfaces
- Introduction 0:32
- Referencing an Interface 3:56
- Why Use an Interface 20:36
- Multiple Implementations 7:42
- Identifying Specific Interface Types 9:30
- 5
Advanced Topics
- Introduction 0:50
- Registering Groups of Services 6:23
- Service Registration Methods 11:08
- TryAdd Option 6:26
- 6
Best Practices
- Introduction 0:39
- Disposing of Services 10:14
- Avoid the Service Locator Pattern 11:49
- Be Careful of Scope 7:19
- 7
Frequently Asked Questions
- Introduction 0:28
- Can I Have Multiple Items with One Interface? 4:45
- Can I Have Other Constructor Parameters? 11:00
- Can I Have Multiple Constructors? 1:06
- Can I Pass In Values to My Constructors Besides Class Instances? 5:10
- Do I Put Every Class In My DI System? 10:44
- 8
Dependency Injection In Common Project Types
- Introduction 0:35
- Console App 20:23
- Worker Service 7:32
- WinForms (.NET Core) 13:34
- WPF (.NET Core) 15:38
- ASP.NET Core 6:43
- Blazor WebAssembly 4:29
- Azure Function 9:47
- 9
Course Conclusion
- Conclusion 1:01
Hi, I'm Tim Corey.
I learned software development the hard way, with lots of dead-ends, confusion, and knowledge gaps. I kept thinking, “It shouldn't be this hard!” Now I teach students how to think and code like professional developers. My goal is to make it easier for you to become a developer.
Frequently asked questions
When does this course start and finish?
How long do I have to access the course?
What if I am unhappy with the course?
This course is part of a Learning Path
Take .NET Core Dependency Injection From Start to Finish on its own, or follow a path that builds around it.