Example #1
0
        public ActionResult GetSuggestions(string text)
        {
            var results = AutoSuggestService.GetSuggestions(text).SuggestionGroups.FirstOrDefault()?.SearchSuggestions;

            return(Json(results.Take(5)));
        }
Example #2
0
        public ActionResult GetSuggestions(string query)
        {
            var suggestions = AutoSuggestService.GetSuggestions(query);

            return(Json(suggestions?.SuggestionGroups[0]?.SearchSuggestions ?? new List <AutoSuggestEntry>()));
        }