Exemplo n.º 1
0
        public async Task <MovieRankResponse> GetMovieRank(string movieName)
        {
            var result = await _repository.GetMovieRanks(movieName);

            var overallMovieRanking = Math.Round(result.Select(m => m.Ranking).Average());

            return(_mapper.ToMovieRankResponse(movieName, overallMovieRanking));
        }