Beispiel #1
0
 public int AddRole(RoleModel roleModel)
 {
     try
     {
         int roleId = roleRepository.AddRole(roleModel);
         int result = 1;
         foreach (ClaimModel claimModel in roleModel.ClaimModels)
         {
             result += claimRepository.AssignClaimToRole(roleId, claimModel.Id);
         }
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }