public async Task <List <CharacterModel> > GetCharactersFromDatabase()
        {
            var results = await _characterRepository.GetAllAsync();

            return(Mapper.ToModelList(results));
        }
示例#2
0
        public async Task <IEnumerable <CharacterDto> > GetCharactersAsync()
        {
            var charactersFromRepo = await _characterRepository.GetAllAsync();

            return(_mapper.Map <IEnumerable <CharacterDto> >(charactersFromRepo));
        }
示例#3
0
        public async Task <IEnumerable <CharacterDTO> > GetAllAsync()
        {
            var characters = await _characterRepository.GetAllAsync();

            return(_mapper.Map <IEnumerable <Character>, IEnumerable <CharacterDTO> >(characters));
        }