public async Task <List <CharacterModel> > GetCharactersFromDatabase() { var results = await _characterRepository.GetAllAsync(); return(Mapper.ToModelList(results)); }
public async Task <IEnumerable <CharacterDto> > GetCharactersAsync() { var charactersFromRepo = await _characterRepository.GetAllAsync(); return(_mapper.Map <IEnumerable <CharacterDto> >(charactersFromRepo)); }
public async Task <IEnumerable <CharacterDTO> > GetAllAsync() { var characters = await _characterRepository.GetAllAsync(); return(_mapper.Map <IEnumerable <Character>, IEnumerable <CharacterDTO> >(characters)); }