Example #1
0
        public GroupClassAggregate RemoveAnchor(string userId)
        {
            AnchorGroupClass anchorRelation = State.Anchors.First(x => x.UserId == userId);

            State.Anchors.Remove(anchorRelation);
            return(this);
        }
Example #2
0
        public GroupClassAggregate AddAnchor(User anchor)
        {
            AnchorGroupClass anchorGroupClass = new AnchorGroupClass()
                                                .WithUser(anchor)
                                                .WithGroupClass(State) as AnchorGroupClass;

            State.Anchors.Add(anchorGroupClass);

            return(this);
        }
Example #3
0
        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);
        }