public GroupClassAggregate RemoveAnchor(string userId) { AnchorGroupClass anchorRelation = State.Anchors.First(x => x.UserId == userId); State.Anchors.Remove(anchorRelation); return(this); }
public GroupClassAggregate AddAnchor(User anchor) { AnchorGroupClass anchorGroupClass = new AnchorGroupClass() .WithUser(anchor) .WithGroupClass(State) as AnchorGroupClass; State.Anchors.Add(anchorGroupClass); return(this); }
public GroupClassBuilder AddAnchor(Action <UserBuilder> actionBuilder) { var user = BuildUserWithRole(actionBuilder, Roles.Anchor); AnchorGroupClass anchorGroupClass = new AnchorGroupClass() { UserId = user.Id, GroupClass = State }; State.Anchors.Add(anchorGroupClass); return(this); }