Great article!

I especially liked the part regard service locator and that you should opt for explicit dependencies.

I'd like to ask if you know what I could do to find dependencies in my command handlers - as shown in this article:

At the very bottom, I actually state that I'd use the IServiceCollection to find registered types, but I totally see why this is not a great thing to do.

Do you have any suggestions on how to solve this?

We can connect on Discord if you'd like.

Written by

Tech writer with 621K+ views. Sharing my opinion and what I learn. Danish C# backend engineer in FinTech. Ex Big4 senior tech consultant.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store