public async Task <IEnumerable <CollectedDataDto> > GetAllInstancesInfo() { var entities = await _repository.GetAllEntities(); var collectedDtos = _mapper.Map <IEnumerable <CollectedData>, IEnumerable <CollectedDataDto> >(entities); return(collectedDtos); }
public async Task <IEnumerable <CollectedDataDto> > GetEntitiesAsync() { var entities = await _repository.GetAllEntities(); if (entities == null) { throw new NotFoundException(); } return(_mapper.Map <IEnumerable <CollectedData>, IEnumerable <CollectedDataDto> >(entities)); }