Beispiel #1
0
        public List <AtomPermissionMiniModel> GetPermission(int userId)
        {
            //var list = PermissionCacher.GetIfExist(userId);
            //if (list.Any()) return list;
            var result = PermissionDataCore.GetPermission(userId);

            PermissionCacher.AddCache(userId, result);
            return(result);
        }
Beispiel #2
0
        public List <AtomPermissionModel> GetPermission(string roleCode)
        {
            var list = PermissionCacher.GetIfExist(roleCode);

            if (list.Any())
            {
                return(list);
            }
            var result = PermissionDataCore.GetPermission(roleCode);

            PermissionCacher.AddCache(roleCode, result);
            return(result);
        }