Exemplo n.º 1
0
        // GET: Account
        public ActionResult Index(string currentFilter, int?page)
        {
            var list = users.GetUsers();
            ///UnityOfWork unity = new Repositories.UnityOfWork();
            //var s = unity.SysUserRepository.Get();
            // db.SysUsers.Add(new Models.SysUser { Email = "*****@*****.**", PassWord = "******", UserName = "******" });
            // db.SaveChanges();
            //var list = db.SysUsers.ToList();
            //var aa = from a in db.SysUsers join b in db.SysDepartments on a.SysDepartmentId equals b.Id select a;
            //var newlist = db.SysUsers.Include(r => r.SysDepartment);
            //users.Dispose();
            int pageSize   = 3;
            int pageNumber = (page ?? 1);

            return(View(list.ToPagedList(pageNumber, pageSize)));
        }
Exemplo n.º 2
0
        //
        // GET: /User/
        public ActionResult Index()
        {
            var users = userRepository.GetUsers();

            return(View(users));
        }