public HttpResponseMessage Countries()
        {
            string            searchString = HttpContext.Current.Request.Params["SearchString"].NormalizeString();
            CachedCountryList countries    = CachedCountryList.GetCountryList(System.Threading.Thread.CurrentThread.CurrentCulture.Name);

            return(Request.CreateResponse(HttpStatusCode.OK, countries.Values.Where(x => x.NormalizedFullName.IndexOf(searchString) > -1).OrderBy(x => x.NormalizedFullName)));
        }
Exemplo n.º 2
0
        public HttpResponseMessage CountryList()
        {
            var res = CachedCountryList.GetCountryList(Thread.CurrentThread.CurrentCulture.Name)
                      .Values;

            return(Request.CreateResponse(HttpStatusCode.OK, res));
        }
Exemplo n.º 3
0
        public HttpResponseMessage Countries()
        {
            var searchString = (HttpContext.Current.Request.Params["SearchString"] ?? "").NormalizeString();
            var countries    = CachedCountryList.GetCountryList(Thread.CurrentThread.CurrentCulture.Name);

            return(Request.CreateResponse(HttpStatusCode.OK, countries.Values.Where(
                                              x => x.NormalizedFullName.IndexOf(searchString, StringComparison.CurrentCulture) > -1).OrderBy(x => x.NormalizedFullName)));
        }