Exemple #1
0
        public IActionResult Get(string cityName)
        {
            var city = _citiesRepository.GetCityByName(cityName);

            if (city == null)
            {
                return(NotFound());
            }

            return(Ok(new CityViewModel(city)));
        }
Exemple #2
0
 public IActionResult Get(string cityName)
 {
     return(Ok(_citiesRepository.GetCityByName(cityName)));
 }