Skip to content
Ambystech.Neo4j.Repository

Ambystech.Neo4j.Repository

A typed Repository pattern for Neo4j, shipped as two focused NuGet packages for .NET 8, .NET 9, and .NET 10.

Generic CRUD

IBaseGraphRepository<T> covers create, read, update, soft and hard delete, count, and pagination out of the box.

Relationship-aware

Mark properties with [GraphField] to declare Neo4j relationships — incoming, outgoing, or both — and let the repository load them for you.

Soft delete

deleted_at is tracked on every node and filtered from default queries.

DI-friendly

AddNeo4jRepository() wires the driver from configuration. Plug in your own INodeConverter<T> or reuse the default.

  • Ambystech.Neo4j.Repository — the repository implementation, extensions, and default converter.
  • Ambystech.Neo4j.Repository.Contracts — base classes, attributes, and search models you can reference from domain projects without pulling in the driver.