示例#1
0
 public async Task <ActionResult> RemoveCategory(int categoryIdx)
 {
     try {
         var   task = Task.Run(() => StockServices.RemoveCategoryAsync(categoryIdx));
         await task;
         return(Ok(task.Result));
     }
     catch (Exception ex) {
         return(BadRequest(ex));
     }
 }