.net Core 2.0 Dependency Injection

I am not sure how to use hangfire with .net Core 2.0 dependency injection. I see AspNetCoreJobActivator but it require IServiceScopeFactory and I don’t know where to get it. How do I use this?

Also, Couldn’t there be a extension method like .useAspNetActivator?

It is set up automatically when you call services.AddHangfire().

1 Like