Exemplo n.º 1
0
        public ActionResult Index(string userName, bool autocompleteSource = false)
        {
            IEnumerable <LibraryUser> userList;

            if (Request.IsAjaxRequest())
            {
                userList = uf.FilterByName(userName, autocompleteSource).Take(50);

                return(PartialView("_UserList", userList));
            }

            userList = uow.LibraryUserRepository.Get(orderBy:
                                                     q => q.OrderBy(u => u.LastName))
                       .Take(25);

            return(View(userList));
        }