Dependency Injection using Ninject
- The following example shows how to set up Dependency Injection using Ninject as an IoC container.
- First add a CustomModule class to your WebJob project, and add any dependency bindings there.
- Then create a JobActivator class:
- When you set up the JobHost in the Program class' Main function, add the JobActivator to the JobHostConfiguration
- Finally in the Functions.cs class, inject your services.