GraphBridge.EntityFrameworkCore
0.1.0-preview.3
Prefix Reserved
dotnet add package GraphBridge.EntityFrameworkCore --version 0.1.0-preview.3
NuGet\Install-Package GraphBridge.EntityFrameworkCore -Version 0.1.0-preview.3
<PackageReference Include="GraphBridge.EntityFrameworkCore" Version="0.1.0-preview.3" />
<PackageVersion Include="GraphBridge.EntityFrameworkCore" Version="0.1.0-preview.3" />
<PackageReference Include="GraphBridge.EntityFrameworkCore" />
paket add GraphBridge.EntityFrameworkCore --version 0.1.0-preview.3
#r "nuget: GraphBridge.EntityFrameworkCore, 0.1.0-preview.3"
#:package GraphBridge.EntityFrameworkCore@0.1.0-preview.3
#addin nuget:?package=GraphBridge.EntityFrameworkCore&version=0.1.0-preview.3&prerelease
#tool nuget:?package=GraphBridge.EntityFrameworkCore&version=0.1.0-preview.3&prerelease

GraphBridge for Entity Framework Core
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. No second ORM, no client-side query fallback, no hidden schema change.
Developer preview, not production-supported. APIs and mappings may change between previews: pin the exact version. Use the async methods; synchronous
SaveChanges()andToList()are refused.
Install
dotnet add package GraphBridge.EntityFrameworkCore --prerelease
Pin the EF Core and driver versions GraphBridge is tested with:
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[10.0.13]" />
<PackageReference Include="Neo4j.Driver" Version="[6.3.0]" />
Quick start
Map an ordinary entity to a node and lend EF a driver your application owns:
public sealed class Person
{
public Guid Id { get; set; }
public string Name { get; set; } = "";
public int? Born { get; set; }
public string? Nickname { get; set; }
public long Version { get; set; }
}
public sealed class PeopleContext(IDriver driver, string database) : DbContext
{
public DbSet<Person> People => Set<Person>();
protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseNeo4j(driver, database);
protected override void OnModelCreating(ModelBuilder model)
=> model.Entity<Person>(person =>
{
person.ToGraphNode("Person");
person.Property(p => p.Id).ValueGeneratedNever().HasGraphPropertyName("id");
person.Property(p => p.Name).HasGraphPropertyName("name");
person.Property(p => p.Born).HasGraphPropertyName("born");
person.Property(p => p.Nickname).HasGraphPropertyName("nickname");
person.Property(p => p.Version).HasGraphPropertyName("version").IsRowVersion();
});
}
GraphBridge never creates schema: create the key constraint it proposes once, then save and query.
await using (var db = new PeopleContext(driver, "neo4j"))
{
db.People.Add(new Person { Id = Guid.NewGuid(), Name = "Keanu Reeves", Born = 1964 });
await db.SaveChangesAsync(); // one CREATE in one transaction; Version becomes 1
}
await using (var db = new PeopleContext(driver, "neo4j"))
{
var name = "Keanu Reeves";
var query = db.People.Where(p => p.Name == name).OrderBy(p => p.Name).Take(5);
Console.WriteLine(query.ToQueryString()); // the Cypher, without running it
var people = await query.ToListAsync();
}
MATCH (n:`Person`)
WHERE coalesce(n.`name` = $p0, (n.`name` IS NULL AND $p0 IS NULL))
RETURN n.`id` AS `c0`, n.`born` AS `c1`, n.`name` AS `c2`, n.`nickname` AS `c3`, n.`version` AS `c4`
ORDER BY n.`name` IS NULL DESC, n.`name` ASC
LIMIT $p1
Values are always parameters, and C# null semantics are kept. The full walkthrough, including the key constraint, is in Getting started.
Every EF concept has a native graph shape
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)
Nodes · references · associations · identified relationships
Three ways to query
| Surface | Use it for |
|---|---|
| EF Core LINQ | Tracked entities and DTOs with EF's C# semantics |
| Fluent Cypher | Typed graph patterns, optional matches, aggregates, EXISTS and paths |
| Native Cypher | Anything else, as reviewed parameterized text |
A query that cannot be translated faithfully is refused before it reaches the database, with a code (GBQ for LINQ, GBFC for Fluent Cypher) and a supported alternative. See known limitations.
Tested with
| Version | |
|---|---|
| .NET SDK | 10.0.401 |
| EF Core | 10.0.13 |
| Neo4j.Driver | 6.3.0 |
| Neo4j | 2026.09 Community; Enterprise reader/writer permissions verified separately |
Other versions, Enterprise schema deployment and clustering are not verified yet. Details: compatibility.
Companion packages
| Package | What it adds |
|---|---|
| GraphBridge.Tooling | Doctor, Verify, Query Lab, design-time commands, ontology compilation and scaffolding |
| GraphBridge.Generators | Compile-time mapping registration from attributes |
| GraphBridge.Templates | dotnet new graphbridge: a console app with offline query tests |
None of them is needed at runtime.
Learn more
- Visual introduction and documentation
- Workshop: 31 runnable lessons
- Samples: code-first, ontology-first and database-first applications
- Changelog and verification summary
Questions, bugs and failing query shapes are welcome in GitHub issues. MIT licensed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.13)
- Neo4j.Driver (>= 6.3.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on GraphBridge.EntityFrameworkCore:
| Package | Downloads |
|---|---|
|
GraphBridge.Tooling
Optional GraphBridge model-authoring and generation tools; not a runtime provider dependency. |
|
|
GraphBridge.EntityFrameworkCore.VectorData
Optional Microsoft.Extensions.VectorData adapter for GraphBridge: search an existing Neo4j node or relationship vector index through IVectorSearchable<TRecord>. The core provider does not depend on it. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.3 | 155 | 10/17/2026 |
| 0.1.0-preview.2 | 56 | 10/16/2026 |
Developer preview. Release notes and the breaking-change policy: https://github.com/joslat/GraphBridge.EFCore/blob/main/CHANGELOG.md