Developer preview. Not production-supported yet. APIs, mappings and generated artifacts may change between previews; pin exact versions and read the changelog and breaking-change policy before upgrading. Install it from nuget.org with
dotnet add package GraphBridge.EntityFrameworkCore --prerelease.Async only. Use
SaveChangesAsync()and async query methods; synchronous persistence and entity-query enumeration are refused (why).
GraphBridge is a real, non-relational Entity Framework Core 10 provider for Neo4j. EF Core owns your model, entity identity and change tracking; the official Neo4j .NET driver owns the connection; GraphBridge stores entities as nodes and relationships and translates queries into parameterized Cypher. There is no second ORM, no client-side query fallback and no hidden schema change. Every supported behavior is tested against a real Neo4j database.
New here? Read the visual introduction or browse the documentation site, then get started or take the workshop.
model.Entity<Person>().ToGraphNode("Person");
model.Entity<Review>().HasOne(r => r.Movie).WithMany(m => m.Reviews)
.HasForeignKey(r => r.MovieId).ToGraphReference("HAS_REVIEW"); // (:Movie)-[:HAS_REVIEW]->(:Review)
var options = new DbContextOptionsBuilder<MoviesContext>()
.UseNeo4j(driver, databaseName: "neo4j") // your application owns the driver
.Options;
await using var db = new MoviesContext(options);
var name = "Keanu Reeves";
var people = await db.People.Where(p => p.Name == name)
.OrderBy(p => p.Name).Take(10).ToListAsync(); // one parameterized Cypher statementKeys are application keys backed by reviewed uniqueness constraints; GraphBridge never creates schema on its own. See concepts, mapping nodes, references, associations and identified relationships.
| Surface | Use it for | Guide |
|---|---|---|
| EF Core LINQ | Tracked entities and DTOs with EF's C# semantics | LINQ queries |
| Fluent Cypher | Typed graph patterns, optional matches, counts, aggregates, EXISTS and paths, with native semantics | Fluent Cypher |
| Native Cypher | Anything else, as reviewed parameterized text with your projector | Native Cypher |
Shapes that cannot be translated faithfully are refused with a code (GBQ for LINQ, GBFC for Fluent Cypher) and an alternative: known limitations.
| Area | What you get |
|---|---|
| Writing | Atomic SaveChangesAsync, explicit transactions shared with every query surface, optimistic concurrency, restrictive deletes: transactions and concurrency, bulk update and delete |
| Graph-native reads | Bounded paths, vector and full-text search with native scores, also through IVectorSearchable<TRecord> with the optional VectorData adapter |
| Types | Explicit null, type and time semantics, including Guid, enum and DateTimeOffset |
| Schema and change | A storage manifest, read-only schema inspection with reviewed proposals, typed migration plans with a journal and recovery: schema and migrations |
| Observability | Query inspection with ToQueryString and server EXPLAIN, and command tracing without leaking values |
Optional, built on the same EF model, never needed at runtime: Doctor diagnoses the model, queries and schema; Verify compiles, plans and compares registered queries; Query Lab shows C#, Cypher and evidence side by side as HTML or in VS Code; the mapping generator writes EF configuration from attributes; GraphBridge.Tool compiles ontologies and scaffolds from an existing graph; plus a project template and design-time commands.
Building blocks for graph-based retrieval-augmented generation on GraphBridge: documents and chunks with exact byte positions, resumable ingestion, vector, full-text and graph retrieval, extraction to an ontology you choose, and answers whose every quote is checked against the stored text, or a refusal. It works with any IChatClient and IEmbeddingGenerator. It is experimental (GBRAG001); its five packages are on NuGet from 0.2.0-preview.1. Start with the overview, the quick start or the tutorial on a real model, and samples 07, 08 and 09.
GraphRAG on Neo4j grew up in Python, and this toolkit learned from it. It began alongside Zaid Zaim's graph-explorer-kit, a GraphRAG app on Neo4j's neo4j-graphrag package with an agent and the Graph Explorer. Contributing to it and talking it through with Zaid led to the idea behind the toolkit: one graph, two stacks. Neo4j's neo4j-graphrag set the conventions: GraphBridge can write its layout, its retriever presets carry the same names, and an interop suite runs both libraries on one database.
Most of what neo4j-graphrag does is now available in .NET: ingestion held to an ontology, vector, hybrid and graph-expanding retrieval, Text2Cypher, PDF, follow-up questions and answers, with checked citations added. On the Python side these roles are spread over several excellent projects: neomodel, neo4j-graphrag and its examples, Neo4j Labs' neo4j-maf-provider, graph-explorer-kit and Neo4j's movies examples. GraphBridge brings the .NET pieces together in one repository. Neo4j Labs also publishes a .NET context provider for Agent Framework, Neo4j.AgentFramework.GraphRAG, and Coming from Python compares it with GraphBridge's. That page maps every piece, and Neo4j's samples to GraphBridge's, and lists what .NET doesn't have yet. GraphBridge is independent: nothing here implies Neo4j's endorsement.
| Start with | |
|---|---|
| Getting started | Install, configure, map an entity, save it and see the Cypher |
| Coming from Neo4jClient? | Neo4jClient's idioms mapped to GraphBridge, and how to read a graph it wrote |
| Coming from Python? | neo4j-graphrag, Neo4j Labs and community projects mapped to GraphBridge, and Neo4j's samples to its samples |
| Workshop | 36 runnable lessons, about three hours for the core track |
| Samples | Code-first, ontology-first and database-first applications, design-time commands, a Fluent Cypher gallery, vector search through VectorData, and three GraphRAG applications |
| Documentation | Every feature, tool and reference page; it also builds as a site with eng/scripts/Build-DocsSite.ps1 |
| Roadmap | What comes next, what is deliberately not planned, and how to influence it |
One runtime package on top of EF Core 10 and Neo4j.Driver 6. It accepts their versions below the next major; pin the tested patches, as compatibility describes. See the architecture overview and the decision records.
Install the .NET SDK pinned in global.json (10.0.401), then:
dotnet restore GraphBridge.sln --locked-mode
dotnet build GraphBridge.sln --no-restoreLive tests run against a disposable Neo4j and skip visibly without it; see tests/README. Public CI is manual and checks build and packaging. What has been verified, and how, is in the verification summary; what is supported is in compatibility. To contribute, read CONTRIBUTING.
Original GraphBridge code and authored samples are MIT licensed. Dependencies keep their own licenses; see third-party notices.
