public async Task <ActionResult> Get(string name = "") { var cities = string.IsNullOrEmpty(name) ? await _citiesQueries.GetDefaultCities() : await _citiesQueries.Get(name); return(Ok(cities)); }
public async Task <ActionResult> Get(string name = "") { var cities = string.IsNullOrEmpty(name) ? await _citiesQueries.GetDefaultCities() : await _citiesQueries.Get(name); if (cities.Count() == 0) { _logger.LogWarning("City search {0} returned 0 results.", name); } return(Ok(cities)); }