1

I have a helper class that takes a service collection and it will scan a folder for dll's to register the controllers with the container.

Now I want to register that helper somewhere so that I can inject it in the ConfigureServices method in the Startup class.

How can I achieve that?

Useme Alehosaini
  • 2,998
  • 6
  • 18
  • 26
Jones
  • 13
  • 3
  • Does this answer your question? https://stackoverflow.com/questions/46429557/inject-dependency-in-the-configureservices – Useme Alehosaini Apr 18 '21 at 09:49
  • Hi @UsemeAlehosaini. Unfortunately it didn't helper me any further. I was thinking to step off from DI and use an extension method. Then I ran into the problem of logging. You can't inject something easily into a static class (https://stackoverflow.com/questions/46483019/logging-from-static-members-with-microsoft-extensions-logging) . – Jones Apr 19 '21 at 19:37

0 Answers0