public IActionResult GetMediaByRating(int rating) { var currentMedia = _mediaRepository.GetByRating(rating); if (currentMedia == null) { return(NotFound()); } else { return(Ok(_mediaRepository.GetByRating(rating))); } }