Neo4jClient.Memgraph
5.0.3
dotnet add package Neo4jClient.Memgraph --version 5.0.3
NuGet\Install-Package Neo4jClient.Memgraph -Version 5.0.3
<PackageReference Include="Neo4jClient.Memgraph" Version="5.0.3" />
<PackageVersion Include="Neo4jClient.Memgraph" Version="5.0.3" />
<PackageReference Include="Neo4jClient.Memgraph" />
paket add Neo4jClient.Memgraph --version 5.0.3
#r "nuget: Neo4jClient.Memgraph, 5.0.3"
#:package Neo4jClient.Memgraph@5.0.3
#addin nuget:?package=Neo4jClient.Memgraph&version=5.0.3
#tool nuget:?package=Neo4jClient.Memgraph&version=5.0.3
Neo4jClient (Fork — Neo4j + Memgraph)
A .NET client for Neo4j and Memgraph. Supports Cypher queries via fluent interfaces.
This is a fork of the original Neo4jClient with the following changes:
- Memgraph support — temporal types and Bolt protocol compatibility for Memgraph
- Newtonsoft.Json → System.Text.Json — replaced all JSON serialization with
System.Text.Json
Grab the latest drop straight from the Neo4jClient package on NuGet.
Key Changes in This Fork
Memgraph Support
Memgraph uses the Bolt protocol and is largely compatible with the Neo4j Cypher API. This fork ensures correct handling of Memgraph-specific temporal type formats.
.NET Type → Bolt Type Mapping
All date/time parameters are automatically converted to native Bolt temporal types, which is required by both Neo4j and Memgraph:
| .NET type | Bolt type | Memgraph / Neo4j display |
|---|---|---|
DateTimeOffset |
ZonedDateTime |
ZonedDateTime('2025-10-30T18:47:18+00:00[Etc/UTC]') |
DateTime |
LocalDateTime |
LocalDateTime('2025-10-30T18:47:18') |
DateOnly (NET6+) |
LocalDate |
Date('2025-10-30') |
Example — no special handling needed, just assign your .NET types:
await _client.GraphClient.Cypher
.Create($"(g:{Neo4jNode.Movie})")
.Set("g = $data")
.WithParam("data", new { CreatedOn = DateTimeOffset.UtcNow, ReleaseDate = DateOnly.Today })
.ExecuteWithoutResultsAsync();
System.Text.Json Migration
Newtonsoft.Json has been fully replaced with System.Text.Json. Custom converters must now implement System.Text.Json.Serialization.JsonConverter<T> instead of Newtonsoft.Json.JsonConverter.
Registering custom converters:
var client = new BoltGraphClient("bolt://localhost:7687", "neo4j", "password");
client.JsonConverters.Add(new MyCustomConverter());
await client.ConnectAsync();
Ignoring properties:
Both [JsonIgnore] (from System.Text.Json) and [Neo4jIgnore] are supported:
public class Movie
{
public string Title { get; set; }
[JsonIgnore]
public string InternalNote { get; set; }
[Neo4jIgnore]
public string AnotherIgnoredProp { get; set; }
}
Custom property names:
public class Movie
{
[JsonPropertyName("title")]
public string Title { get; set; }
}
Passing native driver date types directly — use [Neo4jDateTime] to bypass automatic conversion:
public class Movie
{
[Neo4jDateTime]
public ZonedDateTime CreatedOn { get; set; }
}
Connecting
BoltGraphClient (Neo4j / Memgraph)
// Neo4j
var client = new BoltGraphClient("neo4j://localhost:7687", "neo4j", "password");
await client.ConnectAsync();
// Memgraph
var client = new BoltGraphClient("bolt://localhost:7687", "memgraph", "password");
await client.ConnectAsync();
Breaking Changes vs Original Neo4jClient
Newtonsoft.Jsonis no longer a dependency — replace anyNewtonsoft.Jsonconverters or attributes- All endpoints are
asynconly — useExecuteWithoutResultsAsync(),ResultsAsync, etc. - Date/time parameters are now sent as native Bolt types — no longer serialized as ISO strings; this is required for correct storage in both Neo4j and Memgraph
Original Package
You can find package: Neo4jClient.Memgraph The upstream project this is forked from: DotNet4Neo4j/Neo4jClient
License Information
Licensed under MS-PL. See LICENSE in the root of this repository for full license text.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.VisualBasic (>= 10.3.0)
- Neo4j.Driver.Signed (>= 5.28.4)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Dynamic.Runtime (>= 4.3.0)
- System.Text.Json (>= 10.0.7)
-
net6.0
- Neo4j.Driver.Signed (>= 5.28.4)
- System.Text.Json (>= 10.0.7)
-
net8.0
- Neo4j.Driver.Signed (>= 5.28.4)
- System.Text.Json (>= 10.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.