Пример #1
0
        public async Task <GameCriterias> GetGameCriterias()
        {
            var genres =
                _mapper.Map <ICollection <GenreDTO>, ICollection <GenreViewModel> >(await _genreService.GetGenresAsync());
            var platforms =
                _mapper.Map <ICollection <PlatformDTO>, ICollection <PlatformViewModel> >(await _platformService.GetPlatformsAsync());

            return(new GameCriterias {
                Genres = genres.ToList(), Platforms = platforms.ToList()
            });
        }