Community

Injecting a Scoped service into IHostedService

(Peter Groenewegen) In our projects we are using IHostedService to run background processes. What I have seen is that when injecting a scoped service into the IHostedService you get a InvalidOperationException on startup.