예제 #1
0
        public async Task <IEnumerable <ApiChampions> > getChampions()
        {
            var championsTask = await _championsRepository.getChampions();

            List <Champions>    champions         = championsTask.ToList();
            List <ApiChampions> championsToReturn = new List <ApiChampions>();

            champions.ForEach(champ => championsToReturn.Add(ChampionsMapper.convertToApiModel(champ)));
            return(championsToReturn);
        }
예제 #2
0
        public async Task <IEnumerable <ApiChampions> > getAvailableChampionsForAccount(string userName)
        {
            var championsTask = await _championsRepository.getAvailableChampionsForAccount(userName);

            List <Champions>    champions         = championsTask.ToList();
            List <ApiChampions> championsToReturn = new List <ApiChampions>();

            champions.ForEach(champ => championsToReturn.Add(ChampionsMapper.convertToApiModel(champ)));
            return(championsToReturn);
        }
예제 #3
0
        public ApiChampions getChampion(int champId)
        {
            Champions champion = _championsRepository.getChampion(champId);

            return(ChampionsMapper.convertToApiModel(champion));
        }