public void AddRole(IRole entity)
        {
            entity.CheckArgument(nameof(entity));

            var item = new Role();

            item.CopyProperties(entity);
            RoleEntities.Add(item);
        }
        public void RemoveRole(IRole entity)
        {
            entity.CheckArgument(nameof(entity));

            foreach (var item in RoleEntities)
            {
                if (entity.Id != 0 && entity.Id == item.Id)
                {
                    RoleEntities.Remove(item);
                }
                else if (item.Description != null && item.Description.Equals(item.Description))
                {
                    RoleEntities.Remove(item);
                }
            }
        }
Exemple #3
0
 public void RemoveRole(IRole role)
 {
     role.CheckArgument(nameof(role));
 }
Exemple #4
0
 public void AddRole(IRole role)
 {
     role.CheckArgument(nameof(role));
 }