Exemplo n.º 1
0
        public ActionResult List(Pagination pagination)
        {
            var result = from role in _roleDao.Find(pagination.PageSize, pagination.CurrentPage)
                         select new
            {
                role.Id,
                role.Name,
                role.Remarks
            };

            int count = _roleDao.Count();

            return(Json(new
            {
                totalRecords = count,
                data = result
            }, JsonRequestBehavior.AllowGet));
        }