Beispiel #1
0
 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));
     }
 }