Пример #1
0
        public async Task <IEnumerable <CollectedDataDto> > GetAllInstancesInfo()
        {
            var entities = await _repository.GetAllEntities();

            var collectedDtos = _mapper.Map <IEnumerable <CollectedData>, IEnumerable <CollectedDataDto> >(entities);

            return(collectedDtos);
        }
Пример #2
0
        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));
        }