public async Task CreateBackgroundJob(string body) { var args = new EmailSendingArgs { Subject = "Created by background task", Body = body }; await _backgroundJobManager.EnqueueAsync(args); }
public async Task ExecuteJobDirect(string body) { var args = new EmailSendingArgs { Subject = "Directly executed", Body = body }; EmailSendingJob job = new EmailSendingJob(_bookRepository); await job.ExecuteAsync(args); }