示例#1
0
        public IActionResult GetList(Role model)
        {
            var bll = new RoleBll();
            var rst = bll.GetList(model);

            return(Json(rst));
        }
示例#2
0
        /// <summary>
        /// 角色列表
        /// </summary>
        /// <returns></returns>
        public IEnumerable <RoleEntity> GetList()
        {
            IEnumerable <RoleEntity> data = new List <RoleEntity>();
            var cacheList = CacheFactory.Cache().GetCache <IEnumerable <RoleEntity> >(roleBll.CacheKey);

            if (cacheList == null)
            {
                data = roleBll.GetList();
                CacheFactory.Cache().WriteCache(data, roleBll.CacheKey);
            }
            else
            {
                data = cacheList;
            }
            return(data);
        }
示例#3
0
        /// <summary>
        /// 角色列表页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var list = roleBll.GetList();

            return(View(list));
        }