Пример #1
0
        public async Task <IActionResult> DeleteMeal(int mealId)
        {
            var command = new DeleteMealCommand(mealId);
            var result  = await _mediatr.Send(command);

            return(result.Failure
          ? Conflict(result)
          : (IActionResult)Created(string.Empty, result.Success));
        }
Пример #2
0
 public async Task <DeleteMealResponse> Delete([FromRoute] DeleteMealCommand command)
 {
     return(await _deleteMealCommandHandler.Handle(command));
 }