public async Task <ActionResult <IEnumerable <MovieRatingViewModel> > > GetMovieRatings() { try { var entities = await _movieRatingRepository.GetAll(); return(entities.Select(GetMapperMovieRatingToMovieRatingViewModel).ToList()); } catch (Exception e) { return(StatusCode(StatusCodes.Status500InternalServerError, new { message = e.Message })); } }