after success jobEmail
job2 is:
BackgroundJob.ContinueJobWith(jobEmail,() => UpdateProductNotification(item), JobContinuationOptions.OnlyOnSucceededState);
job2 is failed
error
Unity.ResolutionFailedException
Resolution failed with error: No public constructor is available for type Nick.DataAccess.Infrastructure.IUnitOfWork. For more detailed information run Unity in debug mode: new UnityContainer(ModeFlags.Diagnostic)
Unity.ResolutionFailedException: Resolution failed with error: No public constructor is available for type Nick.DataAccess.Infrastructure.IUnitOfWork.
This isn’t specific to Hangfire. You need to setup the container before passing it to Hangfire. You also shouldn’t be registering types in the job activator. The passed container should already be setup.
I’m not familiar with Unity but the syntax looks similar to autofac. You should be registering the concrete type as the injectable type. Something like: