Example #1
0
        public async Task <MovieOverallRankResponse> GetMoviesRanking(string movieName)
        {
            var response = await _movieRankRepository.GetMoviesRanking(movieName);

            var overAllRanking = Math.Round(response.Select(x => x.Ranking).Average());

            return(new MovieOverallRankResponse
            {
                MovieName = movieName,
                OverAllRank = overAllRanking
            });
        }