public JsonResult capitanes(string query) { var capitanes = new List <object>(); if (query != "") { capitanes = DaoLib.autocomplete("tbl_capitan", '%' + query + '%'); } return(Json(capitanes, JsonRequestBehavior.AllowGet)); }