Beispiel #1
0
        public void Add(IUser usr, IEvent evt)
        {
            EventRelationship rel = new EventRelationship {
                AttendStatus = EventAttendantsStatus.Going
            };

            _dbms.Cypher.Match("(inviter:User)")
            .Where((User inviter) => inviter.ID.ToString() == usr.ID.ToString()).Create("inviter-[rel:EVENTOWNER]->(event:Event {evt})")
            .WithParam("evt", evt)
            .Set("rel = {rel}")
            .WithParam("rel", rel).ExecuteWithoutResults();
        }
Beispiel #2
0
        public void LinkToEvent(IUser usr, IEvent evt)
        {
            EventRelationship rel = new EventRelationship {
                AttendStatus = EventAttendantsStatus.Invited
            };

            _dbms.Cypher
            .Match("(user:User)", "(evtImp:Event)")
            .Where((User user) => user.ID.ToString() == usr.ID.ToString())
            .AndWhere((ScheduledEvent evtImp) => evtImp.ID.ToString() == evt.ID.ToString()).Create("user-[rel:GUEST]->evtImp")
            .Set("rel = {rel}")
            .WithParam("rel", rel).ExecuteWithoutResults();
        }
Beispiel #3
0
        public void ChangeUserAttendStatus(Guid userId, Guid eventId, EventAttendantsStatus attendStatus)
        {
            EventRelationship rel = new EventRelationship {
                AttendStatus = attendStatus
            };

            _dbms.Cypher
            .Match("(user:User)-[rel:GUEST]->(evtImp:Event)")
            .Where((User user) => user.ID.ToString() == userId.ToString())
            .AndWhere((ScheduledEvent evtImp) => evtImp.ID.ToString() == eventId.ToString())
            .Set("rel = {rel}")
            .WithParam("rel", rel)
            .ExecuteWithoutResults();
        }