public JsonNetResult TypeAutocomplete(string types, string q, int l) { var result = TypeClient.ViewableServerTypes() .Where(t => t.CleanName.Contains(q, StringComparison.InvariantCultureIgnoreCase)). Take(l) .Select(o => new AutocompleteResult { id = o.Id.ToString(), text = o.ToString(), type = Navigator.ResolveWebTypeName(o.GetType()) }).ToList(); return(this.JsonNet(result)); }
IEnumerable <Lite <Entity> > EntityType_AutoCompleting(string text) { return(TypeClient.ViewableServerTypes().Where(t => t.CleanName.Contains(text, StringComparison.InvariantCultureIgnoreCase)).Select(t => t.ToLite()).Take(5)); }