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)); }
public async Task <DeleteMealResponse> Delete([FromRoute] DeleteMealCommand command) { return(await _deleteMealCommandHandler.Handle(command)); }