The Unhandled Exception Podcast cover image

Dependency Injection in .NET with Steve Collins

The Unhandled Exception Podcast

00:00

Dotnet Container

The dotnet container works on the basis of a lasting winds principle. So if your consuming class says, i want one instance of interface a, then whatever the last one you've registered will be the one that gets served up. If thay are innumerable, you'll get them in the order that they were registered with the container. You can do a link query and say, order by whatever you want to order it by to get them into the right order. I wouldn't necessarily advocate is testing what the concrete implementation name is, because that may be a never shifting sands underneath you. But by doing that, i innumerable, you get all the different implementations, and then it's up to

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app