public async Task <IActionResult> EditPrice(FoodPriceInputModel model) => await this.Handle( async() => { await this.foodService.EditPrice(model); }, success : RedirectToAction(nameof(HomeController.Index), "Home"), failure : View(nameof(EditPrice), model));
public async Task <IActionResult> EditPrice(FoodPriceInputModel model) { var food = await this.foodService.EditPrice(model.FoodId, model.Price); if (food == null) { return(this.NotFound()); } return(this.Ok(food)); }