public Boolean IsEqual(RoleMembership compareMembership) { Boolean isEqual = true; isEqual = isEqual && (securityAuthorityId == compareMembership.SecurityAuthorityId); isEqual = isEqual && (securityGroupId == compareMembership.SecurityGroupId); return(isEqual); }
public void AddMembership(Int64 securityAuthorityId, String securityAuthorityName, String securityGroupId, String securityGroupName) { if (!MembershipExists(securityAuthorityId, securityGroupId)) { RoleMembership newMembership = new RoleMembership(application); newMembership.RoleId = roleId; newMembership.SecurityAuthorityId = securityAuthorityId; newMembership.SecurityAuthorityName = securityAuthorityName; newMembership.SecurityGroupId = securityGroupId; newMembership.SecurityGroupName = securityGroupName; membership.Add(newMembership); } return; }