.NET Dependency Injection - The .NET 6 Booster Jab

Dependency Injection has been available out of the box in .NET since the introduction of .NET Core, but the way we work with it in ASP.NET Core is changing in .NET 6 thanks to the new WebApplicationBuilder class and Minimal APIs.

In this talk, we will look at the differences between .NET 5 and .NET 6 application bootstrapping and why doing everything in the Program.cs file is perhaps not such a good idea.

We also take a deep dive into understanding the different dependency lifetimes and how things can go wrong when incorrectly mixed together,

Lastly, we look at how we can
* avoid common service registration problems and mistakes
* understand how dependency lifetimes affect middleware
* avoid memory leaks when using 'disposable' objects
* apply workarounds to use injection styles not supported out of the box

The talk assumes that you have already had an initial dose of DI knowledge and are now ready for a top up to avoid some nasty bugs.

About the .NET Dependency Injection - The .NET 6 Booster Jab talk

Target audience - Intermediate .NET developers

Session Time : 60 minutes
Preferred Session : Morning session

Previous presentations of talk

This is a new updated version of a talk (based on .NET 5) that has previously been presented online to user groups in the UK, DDD Reading and NDC London 2021 ( and finally as a webinar for JetBrains (

The first outing of (an extended version of) this .NET 6 version has been presented online to DotNetDevs Austria -

The version of the talk being submitted here goes into less detail so that it will fit into a 55 minute time-slot.

Examples of other talks that I have presented in person can be seen on You Tube
* DDD East Midlands - The Source Code Generation Game -
* .NET Sheffield -

Previous Presenting Experience at User Groups / Community Conferences
* DDD Reading, DDD North, DDD East Anglia, DDD East Midlands
* .NET Notts, .NET Cambridge, .NET Sheffield, .NET Milton Keynes, .NET Oxford, South Coast Developers

Podcast appearances talking about Dependency Injection

Other podcast appearances talking about .NET Configuration

Video Streaming appearances

Hosting User Group

Steve Collins

Freelance software developer based in the South East of the UK

Worthing, United Kingdom


Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top