Exemple #1
0
        public IEnumerable <Cities> GetSuggestionsByCriteria(string q = null, float?lat = null, float? @long = null)
        {
            var cities = CitiesRepository.GetSuggestionsByCriteria(q, lat, @long);

            if (cities != null && cities.Count() == 0)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            return(cities);
        }