I would like to be able to access the built-in IoC container (IServiceProvider
I believe).
I know that it is generally bad practice to access this in code and that we should allow the framework to inject whichever dependencies are needed in to things like controllers.
My particular application for this is that I am using another product Hangfire. This framework instantiates objects itself. In order to have dependencies injected into these objects you need to override the JobActivator class and refer to your own container there.
This question shows how to create a new container for testing purposes, but I would like access to the one I have already set up and not have to duplicate it. With DI frameworks like Autofac you get access to the container when you build it after adding all the services.
Can anyone help?