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

GraphBridge.Generators
Optional compile-time mapping for GraphBridge, the Entity Framework Core provider for Neo4j. Declare the graph mapping with attributes; the generator writes ordinary EF fluent registration, static identifiers and a storage fingerprint. The finalized EF model stays the runtime authority, and no generator assembly ships with your application.
<PackageReference Include="GraphBridge.Generators" Version="<version on this page>" PrivateAssets="all" />
Declare the model
using GraphBridge.Generated;
[GraphModel(typeof(Person), SchemaPolicy = GraphSchemaPolicy.ExistingConstraints)]
public static partial class PeopleMapping { }
[GraphNode("Person", nameof(Id))]
public sealed class Person
{
[GraphProperty("id", true, Conversion = GraphConversion.GuidString)]
public Guid Id { get; set; }
[GraphProperty("name", false)]
public string? Name { get; set; }
}
Call PeopleMapping.Apply(modelBuilder) in OnModelCreating. Once the context model has finalized, call PeopleMapping.Verify(context.Model): it compares the whole storage model with PeopleMapping.Fingerprint and fails if registration was skipped or later configuration changed the storage contract.
What you get
| Registration | Plain EF fluent code for nodes, composite keys up to sixteen properties, and identified relationships with typed source and target |
| Identifiers | Deterministic label, relationship-type and property-name constants, with optional IRIs |
| Fingerprint | A storage fingerprint that Verify checks against the finalized model |
| Diagnostics | Located compile errors with codes and repair steps instead of guessed mappings |
Boundaries
- The generator never loads your assembly, constructs a context, runs
OnModelCreatingor opens a database. - Constraints are provisioned separately; the generator never checks or deploys them.
- Not covered yet, among others: inheritance, records, generic or nested entities, shadow properties, alternate keys, association edges, native one-to-many references and custom conversions.
- Targets
netstandard2.0; verified with Roslyn 5.9.0 from .NET SDK 10.0.401.
Read the mapping generator guide for every attribute and diagnostic code, and the documentation for GraphBridge itself. Feedback is welcome in GitHub issues. MIT licensed.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.3 | 45 | 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