예제 #1
0
        public ActionResult GetUserByName(string term)
        {
            var users = WebCacheHelper.GetUsernames()
                        .Where(p => !p.Key.EqualsIgnoreCaseAndBlank(this.Username) && p.Value.StartsWith(term, StringComparison.OrdinalIgnoreCase))
                        .Select(p => new
            {
                label = p.Value,
                value = p.Key
            }).ToList();

            return(Json(users, JsonRequestBehavior.AllowGet));
        }