Exemplo n.º 1
0
        public async Task <List <PointOfInterestDto> > GetForCity(int cityId)
        {
            var pointsOfInterest = await _repository.GetForCity(cityId);

            var dtos = _mapper.Map <List <PointOfInterestDto> >(pointsOfInterest);

            return(dtos);
        }
Exemplo n.º 2
0
        public async Task <GetCityOutput> Get(GetCityInput input)
        {
            var city = await _cityRepository.Get(input.Id);

            var pointsOfInterest = await _poiRepository.GetForCity(input.Id);

            city.PointsOfInterest = pointsOfInterest.ToList();
            var dto = _mapper.Map <GetCityOutput>(city);

            return(dto);
        }