public async Task <List <PointOfInterestDto> > GetForCity(int cityId) { var pointsOfInterest = await _repository.GetForCity(cityId); var dtos = _mapper.Map <List <PointOfInterestDto> >(pointsOfInterest); return(dtos); }
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); }