public IActionResult PostUnSyncInvoiceToNav() { NavPostData sync = new NavPostData(_context, _mapper); Store store = JsonConvert.DeserializeObject <Store>(HttpContext.Session.GetString("Store")); //sync.PostSalesInvoice(store); //sync.PostSalesInvoice(store); BackgroundJob.Enqueue(() => sync.PostCustomer()); BackgroundJob.Enqueue(() => sync.PostUnSyncInvoie(store)); // BackgroundJob.Enqueue(() => Console.WriteLine("test from background")); var data = new { Status = 200, Message = "Success" }; return(Ok(data)); }