public IActionResult GetCities(bool includePointsOfInterest = false) { var cityEntities = _repository.GetCities(includePointsOfInterest); if (includePointsOfInterest) { var citiesResult = Mapper.Map <List <CityDTO> >(cityEntities); return(Ok(citiesResult)); } var results = Mapper.Map <IEnumerable <CityWithoutPointsOfInterestDto> >(cityEntities); return(Ok(results)); }
public async Task <ActionResult <IEnumerable <City> > > Get() { return(await rep.GetCities().ToListAsync()); }
public List <City> GetAllCities() { return(citiesRepository.GetCities()); }
public IEnumerable <CityInfo> GetCities() { return(citiesRepository.GetCities().Select(city => city.AsDto())); }
public List <City> GetCities() { return(_mapper.Map <List <City> >(_cityRepository.GetCities())); }
static Game() { _cityRepo = new SqlCeCitiesRepository(); Cities = _cityRepo.GetCities(); }
public async Task <Page <City> > Get(string term) { term ??= ""; return(await _repo.GetCities(term, 10));; }