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