I'm doing a Fire-and-Forget method invocation like this.
BackgroundJob.Enqueue(() => SendEmail(name));
I would like to pass the job id to the SendEmail() method and use it inside the method.
The easy way is to add
PerformContext
to the job method:. Hangfire Forum topic Use Hangfire job id in the code.