Background Commands with MediatR and Hangfire
I’ve been using MediatR and Hangfire independently for awhile. I’ve previously posted one solution on how you could use send Commands with MediatR and Hangfire. The solution I had come up with in that post was to get around the expression serialization issue with type parameters in MediatR’s Send<T>. IRequest<Unit> Because we are creating a a fire and forget command which will be run in the background, there will be no return value. MediatR handles these types of requests by using the Unit type. When creating a command you will implement IRequest and your request handler will implement IRequestHandler<IRequest, Unit>.… Read More »Background Commands with MediatR and Hangfire