Azure WebJob and wiring up IServiceCollecton from Microsoft.Extensions.DependencyInjection

Viewed 1811

I'm trying to figure out how to do dependency injection in an Azure WebJob using a ServiceCollection from Microsoft.Extensions.DependencyInjection

E.g.:

services.AddTransient<IAdminUserLogsService, AdminUserLogsService>();

I can't quite figure out how to wire up this service collection into something that the WebJobs JobHostConfiguration.JobActivator can understand

My intention is to re-use the default service wiring I've setup with this method as per the default AspNet core Startup.cs way.

1 Answers
Related