Пример #1
0
        public IActionResult Get(string cityName)
        {
            _logger.LogDebug("Start New Request for controller {controller} and action {ActionName} with city name {CityName}", nameof(WeatherForecastController), nameof(Get), cityName);
            var result = _weatherForecastRepository.GetByCityName(cityName);

            if (result == null)
            {
                return(NotFound(cityName));
            }
            return(Ok(result));
        }