Training

.NET Core Dependency Injection From Start to Finish

Create modern, resilient applications!

45 lessons5 hoursEN & ES subtitles

What you'll work with

Dependency Injection BasicsScopesMulti-implementationsGroup registrationBest practicesWinForms DIWPF DIConsole App DIAzure Function DIWorker Service DI

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.

Watch the course intro →

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.

FoundationUnderstand how to set up dependency injection
  1. 1
    Course Introduction 6 lessons · 38 min
    • 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. 2
    The Basics 7 lessons · 32 min
    • 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. 3
    Scope 4 lessons · 13 min
    • Introduction 0:35
    • Transient 2:15
    • Singleton 5:16
    • Scoped 5:20
  4. 4
    Using Interfaces 5 lessons · 40 min
    • Introduction 0:32
    • Referencing an Interface 3:56
    • Why Use an Interface 20:36
    • Multiple Implementations 7:42
    • Identifying Specific Interface Types 9:30
AdvancedConquer the advanced topics and best practices
  1. 5
    Advanced Topics 4 lessons · 24 min
    • Introduction 0:50
    • Registering Groups of Services 6:23
    • Service Registration Methods 11:08
    • TryAdd Option 6:26
  2. 6
    Best Practices 4 lessons · 29 min
    • Introduction 0:39
    • Disposing of Services 10:14
    • Avoid the Service Locator Pattern 11:49
    • Be Careful of Scope 7:19
  3. 7
    Frequently Asked Questions 6 lessons · 32 min
    • 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
  4. 8
    Dependency Injection In Common Project Types 8 lessons · 1h 15m
    • 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
  5. 9
    Course Conclusion 1 lesson · 1 min
    • Conclusion 1:01
Tim Corey

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.

25+ Years experience
400,000+ Students taught
400+ Hours of training
10x Microsoft MVP

Frequently asked questions

When does this course start and finish?
The course starts now and never ends! It is a completely self-paced online course; you decide when you start and when you finish.
How long do I have to access the course?
How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like; across any and all devices you own.
What if I am unhappy with the course?
I do my best to provide the highest quality training to help you become a successful developer. But if this course isn't for you, then you can count on a no-hassle 30 Day Money Back Guarantee.

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.