public async Task <IActionResult> RateMedia([FromBody] UserMediaRatingDto userMediaRatingDto) { if (!ModelState.IsValid) { return(BadRequest()); } var userMediaRating = _mapper.Map <UserMediaRating>(userMediaRatingDto); var result = await _mediaRepo.RateMediaAsync(userMediaRating); if (result) { return(Ok()); } return(StatusCode(500, "Unable to Rate Media at this time, please try later")); }