public async Task <ActionResult> removeProduct(int productIdx) { try { var task = Task.Run(() => StockServices.RemoveProduct(productIdx)); await task; return(Ok(task.Result)); } catch (Exception ex) { return(BadRequest(ex)); } }