/// <summary> /// Updates the breakfast review with the specified identifier. /// </summary> /// <param name="id">The identifier.</param> /// <param name="request">The request.</param> /// <returns></returns> public async Task <BreakfastReviewViewModel> UpdateRatingAsync(string id, UpdateBreakfastReviewRatingRequest request) { var result = await Repository.UpdateRatingAsync(id, request.Rating); if (result == null) { throw EntityNotFoundException.Create <BreakfastReview>(x => x.Id, id); } return(Mapper.Map <BreakfastReviewViewModel>(result)); }
public async Task <BreakfastReviewViewModel> UpdateAsync(string id, [FromBody] UpdateBreakfastReviewRatingRequest request) => await _service.UpdateRatingAsync(id, request);