I need to use some of my services in job class of Quartz.net I use Autofac as dependency injection
public class PushJob : IJob
{
public async Task Execute(IJobExecutionContext context)
{
// need to use some service here
}
}
If you seek the simplest solution, just make your PushJob class a starting point = composition root of your DI like this:
in Register() just create your container instance, register all dependencies and store in _container. Then in DoWork do something like:
that will actually instantiate your worker with your service injected as needed.