Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. var jobId = BackgroundJob.Enqueue(
  2. () => Console.WriteLine("Fire-and-forget!"));
  3.  
  4. public IActionResult AddLogs(List<Log> logs)
  5. {
  6. BackgroundJob.Enqueue(() => DM.AddLogsBackground(logs));
  7. return Ok();
  8. }
  9.  
  10. public async IActionResult<Task> AddLogs(List<Log> logs)
  11. {
  12. await DM.AddLogs(logs);
  13. return Ok();
  14. }
  15.  
  16. public async Task AddLogs(List<Log> logs)
  17. {
  18. BackgroundJob.Enqueue(() => AddLogsBackground(logs));
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement