NFalkorDB extends StackExchange.Redis with a .NET-friendly API for working with the FalkorDB Redis module—bringing graph-native commands into your C# projects with ease.
Built on top of the native Execute
and ExecuteAsync
methods, NFalkorDB offers a set of extension methods that mirrors the command structure of Jedis's FalkorDB support, giving you familiar, fluent access to graph operations.
PM> Install-Package NFalkorDB -Version 1.0.0
Before using NFalkorDB, ensure the FalkorDB module is installed on your Redis server.
To verify:
MODULE LIST
Expected output (version may vary):
1) "name"
2) "graph"
3) "ver"
4) 4) (integer) 20811
NFalkorDB exposes FalkorDB commands as C# extension methods through StackExchange.Redis.
// Connect the database and pick a Graph
ConnectionMultiplexer muxr = ConnectionMultiplexer.Connect(ConnectionString).
Graph graph = new FalkorDB(muxr.GetDatabase()).SelectGraph("social");
// Create the Graph
graph.Query("""CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}),
(:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}),
(:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})""");
// Query the Graph
ResultSet resultSet = graph.ReadOnlyQuery("MATCH (a:person)-[r:knows]->(b:person) RETURN a, r, b");
For real-world usage and supported operations, see our integration tests:
These tests cover core functionality, including querying, creating, updating, and deleting graph data. Integration Tests
NFalkorDB is licensed under the Apache-2.0 license .