Exemplo n.º 1
0
        public IActionResult GetCitiesForZipCode(int zipCode)
        {
            logger.LogInformation(nameof(GetCitiesForZipCode), zipCode);

            Task <IEnumerable <KeyValuePair <string, int> > >
            result = weatherService.GetCitiesIdsForZipCode(zipCode);

            if (result.Result.Any())
            {
                return(Ok(result));
            }

            return(NotFound());
        }