public ActionResult Autocomplete(string query, long?category) { var suggestions = _repository.Autocomplete(query, category); return(Json(suggestions.ToArray(), JsonRequestBehavior.AllowGet)); }