public static ActionDefineViewModel ToModel(this RActionDefine actionDefine)
 {
     if (actionDefine == null)
     {
         return(null);
     }
     return(new ActionDefineViewModel()
     {
         Name = actionDefine.Name,
         Id = actionDefine.Id,
         Group = actionDefine.Group
     });
 }
 public static ActionDefineViewModel ToModel(this RActionDefine actionDefine, bool @checked)
 {
     if (actionDefine == null)
     {
         return(null);
     }
     return(new ActionDefineViewModel()
     {
         Name = actionDefine.Name,
         Id = actionDefine.Id,
         Group = actionDefine.Group,
         Checked = @checked
     });
 }
 public async Task Handle(ActionDefineAddEvent mesage)
 {
     try
     {
         RActionDefine actionDefine = new RActionDefine()
         {
             Id   = mesage.Id,
             Name = mesage.Name
         };
         await _roleService.AddToCache(actionDefine);
     }
     catch (Exception e)
     {
         e.Data["Param"] = mesage;
         throw e;
     }
 }
 public async Task <bool> ActionDefineAdd(RActionDefine actionDefine)
 {
     return(await RedisStorage.HashSet(ActionDefineStorageKey, actionDefine.Id, actionDefine));
 }
Example #5
0
 public async Task AddToCache(RActionDefine action)
 {
     await _roleCacheStorage.ActionDefineAdd(action);
 }