public IActionResult GetList(Role model) { var bll = new RoleBll(); var rst = bll.GetList(model); return(Json(rst)); }
/// <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); }
/// <summary> /// 角色列表页面 /// </summary> /// <returns></returns> public ActionResult Index() { var list = roleBll.GetList(); return(View(list)); }