Book Image

Neo4j Cookbook

By : Ankur goel, Ankur Goel
Book Image

Neo4j Cookbook

By: Ankur goel, Ankur Goel

Overview of this book

Table of Contents (17 chapters)
Neo4j Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Accessing Neo4j from .NET


This chapter would be incomplete without the discussion on how to access Neo4j from the .NET Framework.

The .NET Framework is still the primary framework for developing all sorts of applications when it comes to the Windows platform.

How to do it...

This problem can be solved in multiple ways using some already available solutions or writing your own code on the top of the REST API.

The Neo4j client is available at https://bitbucket.org/Readify/neo4jclient/wiki/Home.

The Neo4j client claims that it makes writing Cypher queries easier with IntelliSense. It comes exclusively as a NuGet package. The following code shows you how to install the package:

# Installing the Package
Install-Package Neo4jClient
# Key class is GraphClient
var c = new GraphClient(new Uri(REST_API_ENDPOINT));
c.Connect();

The .NET Framework comes with many REST client libraries, and they can be used to write your own framework on top of the REST API endpoint, for example, using RESTSharp, you can refer...