Ejemplo n.º 1
0
 public void Follow(string SourceUserId, string targetUserId)
 {
     try
     {
         _graphDB.CreateRelationship(SourceUserId, targetUserId, "Follow");
     }
     catch (Exception)
     {
         throw new FaildToConnectDbException();
     }
 }
Ejemplo n.º 2
0
        //Public Methods
        public void AddPost(PostDTO postDTO, string userId)
        {
            _graphDB.AddPost(postDTO.Post);
            _graphDB.CreateRelationship(userId, postDTO.Post.PostID, "Publish");

            foreach (var item in postDTO.Tags)
            {
                _graphDB.CreateRelationship(postDTO.Post.PostID, item, "TagPost");
            }
        }