Released 7 years ago , Last update 7 years ago

Join the NoSql movement with this library by using neo4j, a high-performance, powerful and flexible graph database. This library wraps all of the REST API methods and make it simple to build a graph-based web applications in .net

Build a social web application? Need a high-performance database with flexible structure? You must consider to use neo4j as your data-store engine!

Neo4j is a NoSql graph-based database, offers flexible schema rather than strict and static tables, high performance and scalability, best for social web applications.

Neo4j can be also deployed into the windows azure cloud (More info)

Neo4j Featues: 

  • an intuitive graph-oriented model for data representation. Instead of static and rigid tables, rows and columns, you work with a flexible graph network consisting of nodes, relationships and properties 
  • a disk-based, native storage manager completely optimized for storing graph structures for maximum performance and scalability.
  • massive scalability. Neo4j can handle graphs of several billion nodes/relationships/properties on a single machine and can be sharded to scale out across multiple machines.
  • a powerful traversal framework for high-speed traversals in the node space.

**About the library...
** Neo4j is written in Java, but supplies a fully Rest API for creating, manipulating and deleting objects from the graph. This .net library wraps the Rest methods and allows you to store .net objects- as a somthing between flexible and static.

More information about Neo4j:

  • 5 0
  • 4 1
  • 3 0
  • 2 0
  • 1 0
1 Reviews Read Reviews


14 day 14-day money-back guarantee


Developer License

  • Perpetual license

  • Unlimited sites, servers

  • No distribution (hosted use only)

  • Commercial use

Usage Instructions

Step 1 - Download and install Neo4j

I assumed that you have installed Java Runtime on your machine. If you haven't did it yet, please download JRE.

Go to and choose the latest version. 
Download and extract the contents to a suitable location.
Start the server by opening a command prompt, and running the command:

bin\neo4j start

If things are fine, enter to http://localhost:7474 on your browser. You will redirect to the administrative web application which provides some information of your database and a simple database navigation interface.


Step 2 - Start Coding!

Graph Objects

Neo4Net Graph node is represented by a class which derives GraphPropertyContainer. The node's default name is the class name, but you can define other name by using [GraphObject("{OBJECT_NAME}"] attribute.

The properties that you want to save in the graph must have GraphPropertyAttribute (similar to DataMemberAttribute in WCF).

For example, I created a Person object which represents a node with person's properties:
public class Person : GraphPropertyContainer { public Person() : base() { }

    public string Firstname { get; set; }

    public string Lastname { get; set; }

   And a KnowsRelation, reperesents a KNOWS relationships between nodes (=people).

public class KnowsRelation : GraphPropertyContainer
    public KnowsRelation() : base() { }

    public DateTime CreationTime { get; set; }

Create a Graph-Context object

var graph = new GraphContext("http://localhost:7474/db/data/");

You can also store the database Url in the element (web.config) with "neo4j" name, and create the GraphContext without any parameter on the construction method.


Create the "Person"-nodes and connect them to the reference node with "KNOWS" relation

Person p1 = new Person()
    Firstname = "Steve",
    Lastname = "Jobs"

Person p2 = new Person()
    Firstname = "Steve",
    Lastname = "Ballmer"

//Creating graph nodes
var p1Node = graph.CreateNode(p1);
var p2Node = graph.CreateNode(p2);

//Connect the nodes with graph "KNOWS" relationship
graph.GetReferenceNode().CreateRelationshipTo(p1Node, new KnowsRelation() { CreationTime = DateTime.Now });
graph.GetReferenceNode().CreateRelationshipTo(p2Node, new KnowsRelation() { CreationTime = DateTime.Now });

I also connected Steve & Steve with "KNOWS" relation:
p1Node.CreateRelationshipTo(p2Node, new KnowsRelation() { CreationTime = DateTime.Now });

Traversing nodes, get node's properties and change them

The following code searches "Person"-nodes that connect with "KNOWS" relation and has a specific property-values: "Steve Jobs". Then it get the node's properties (based on Person object), change to "Eric Shmidt" and commit the changes in the graph.

// Get the "Steve Jobs" object and change it to "Eric Shmidt"
var node = graph.GetReferenceNode().TraverseNodes(Neo4Net.Core.TraversalOrder.DepthFirst, 1, x => x.Firstname == "Steve" && x.Lastname == "Jobs", typeof(KnowsRelation), Neo4Net.Core.Direction.Outgoing).FirstOrDefault();
if (node != null)
    var properties = node.GetProperties();
    properties.Firstname = "Eric";
    properties.Lastname = "Shmidt";


The powerful of graph-databases

Graph databases is great for social applications, not only because it can handles billions of data, but it offers a simple and flexible structure based on **relationships between objects, **similar to the real world.
If I'd like to know who are the people that Eric Shmidt knows, I just need to get the objects that connect to Eric with "KNOWS" relation!

// Get all the people that Eric Shmidt knows
var peopleThatEricKnows = p1Node.TraverseNodes(Neo4Net.Core.TraversalOrder.DepthFirst, 1, Neo4Net.Core.ReturnableEvaluator.AllButStartNode, typeof(KnowsRelation), Neo4Net.Core.Direction.Outgoing);

I can also get the opposite case, when I'd like to know who are the people that knows Eric.
Just change the direction from Outgoing to Incoming:

var peopleThatKnowsEric = p1Node.TraverseNodes(Neo4Net.Core.TraversalOrder.DepthFirst, 1, Neo4Net.Core.ReturnableEvaluator.AllButStartNode, typeof(KnowsRelation), Neo4Net.Core.Direction.Incoming);
1 license From » $13.99 View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

Or enter your name and Email
  • SS Samrin shaikh 4 years ago
    Please can you please provide me the sample step by step to create .net application which will insert , update data in Neo4j DB
  • A Andrew 6 years ago
    please can you provide a trial license for 30 days? i'm very kean to dulge into this library, can you tell me what .net framework this depends on.
  • T tommyngo 6 years ago
    please tutorial step by step to create .net application.