Exemplo n.º 1
0
 public IActionResult SavaUserRole(int userID, int[] roleIDs)
 {
     try
     {
         var result = _userRepository.AddUserRole(userID, roleIDs);
         return(ToJson(result?HttpResult.Success:HttpResult.Fail, result?"保存成功":"保存失败"));
     }
     catch (Exception exc)
     {
         return(ToJson(HttpResult.Exception, message: exc.Message));
     }
 }