public UserGroupMembership MakeMemberOf(Guid userGroupGuid) { if (IsMemberOf(userGroupGuid)) { throw new Exception("Already a member of ..."); // TODO *** } var ug = new UserGroup(Context); ug.Guid = userGroupGuid; ug.Load(); var ugm = new UserGroupMembership(this); ugm.Name = ug.Name; ugm.UserGroup = ug; ugm.Save(); return(ugm); }
/// <summary> /// Creates a deep copy of the passed object. /// </summary> /// <param name="old">A <b>Slice</b> object to create the deep copy from.</param> private void CopyMembers(UserGroupMembership old) { }
/// <summary> /// Copy contructor for doing deep copy of the <b>Slice</b> objects. /// </summary> /// <param name="old">The <b>Slice</b> to copy from.</param> public UserGroupMembership(UserGroupMembership old) : base(old) { CopyMembers(old); }