예제 #1
0
        public JsonResult GetTrackTitles(string query)
        {
            TrackSearchResult        tsResult    = new TrackSearchResult();
            List <TrackSearchResult> suggestions = tsResult.GetTrackSearchResults(query, 20);

            string[] titles = new string[suggestions.Count];
            for (var i = 0; i < suggestions.Count; i++)
            {
                titles[i] = suggestions.ElementAt(i).TrackTitle;
            }
            return(Json(titles, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public ActionResult Index(string query)
        {
            TrackSearchResult tsResult = new TrackSearchResult();

            return(View(tsResult.GetTrackSearchResults(query, 500)));
        }