Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8048585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:29:28+00:00 2026-06-05T06:29:28+00:00

I saw a post with same title, but unfortunately couldn’t find a soulution by

  • 0

I saw a post with same title, but unfortunately couldn’t find a soulution by looking at given examples

I have created the nodes the folowing way:

private static void createExampleNetwork(GraphClient client)
    {
        try
        {
            //CypherQuery cq = new CypherQuery();
            //string createNodeQuery = "CREATE (a {name : 'Andres'}) RETURN";
            //string response = cq.CreateRequest(createNodeQuery);

            var myNodeReferenceA = client.Create(new ExampleNode { Name = "A" });
            var myNodeReferenceB = client.Create(new ExampleNode { Name = "B" });
            var myNodeReferenceC = client.Create(new ExampleNode { Name = "C" });
            var myNodeReferenceD = client.Create(new ExampleNode { Name = "D" });
            var myNodeReferenceE = client.Create(new ExampleNode { Name = "E" });
            var myNodeReferenceF = client.Create(new ExampleNode { Name = "F" });
            var myNodeReferenceG = client.Create(new ExampleNode { Name = "G" });
        }
        catch (Exception ex)
        {

        }
    }

I would like to create the following relationships:
A–B
A–C
A–D
C–D
B–G

but don’t know how.

I’ve looked at examples
http://hg.readify.net/neo4jclient/src/4693da483a90/Test/RelationshipTests.cs
and
http://hg.readify.net/neo4jclient/src/4693da483a90/Test/ApiUsageIdeas.cs

but still don’t know how the relationships are created.

I would be very thankful if anyone could give a useful example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:29:30+00:00Added an answer on June 5, 2026 at 6:29 am

    I’ve found a solution

    private static void createExampleNetwork(GraphClient client)
        {
            try
            {
    
                var myNodeReferenceA = client.Create(new ExampleNode { Name = "A" });
                var myNodeReferenceB = client.Create(new ExampleNode { Name = "B" });
                var myNodeReferenceC = client.Create(new ExampleNode { Name = "C" });
                var myNodeReferenceD = client.Create(new ExampleNode { Name = "D" });
                var myNodeReferenceE = client.Create(new ExampleNode { Name = "E" });
                var myNodeReferenceF = client.Create(new ExampleNode { Name = "F" });
                var myNodeReferenceG = client.Create(new ExampleNode { Name = "G" });
    
                client.CreateRelationship(myNodeReferenceA, new NodeKnows(myNodeReferenceB));
                client.CreateRelationship(myNodeReferenceA, new NodeKnows(myNodeReferenceC));
                client.CreateRelationship(myNodeReferenceA, new NodeKnows(myNodeReferenceD));
                client.CreateRelationship(myNodeReferenceA, new NodeKnows(myNodeReferenceE));
                client.CreateRelationship(myNodeReferenceB, new NodeKnows(myNodeReferenceF));
                client.CreateRelationship(myNodeReferenceB, new NodeKnows(myNodeReferenceG));
                client.CreateRelationship(myNodeReferenceC, new NodeKnows(myNodeReferenceD));
                client.CreateRelationship(myNodeReferenceE, new NodeKnows(myNodeReferenceF));
            }
            catch (Exception ex)
            {
    
            }
        }
    
     public class NodeKnows :Relationship, IRelationshipAllowingSourceNode<ExampleNode>, IRelationshipAllowingTargetNode<ExampleNode>
    {
        public NodeKnows(NodeReference targetNode)
            : base(targetNode)
        {
        }
    
        public const string TypeKey = "KNOWS";
        public override string RelationshipTypeKey
        {
            get { return TypeKey; }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw this post but didn't understand if this was the same issue. My
I saw any post about Reachability but people doesn't really give the exact answer
I saw this post Ruby on Rails - Awesome nested set plugin but I
Before you mark this as answered in another post (I already saw those). But
I have been following the guidance given on this other post: Assigning an IronPython
I saw a similar post that was trying to do this same thing with
I saw this post on SO already but it still begs the question, at
I saw a post on this already, but it didn't really provide a solution
I have read several of the post about Objective-C method syntax but I guess
I actually have two questions regarding the same problem but I think it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.