public void Follow(string SourceUserId, string targetUserId) { try { _graphDB.CreateRelationship(SourceUserId, targetUserId, "Follow"); } catch (Exception) { throw new FaildToConnectDbException(); } }
//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"); } }