Upgrade from older versions

This page contains the list of new features and breaking changes of the driver from version 4.4 to 5.x. For a full list of changes, see the Driver → Changelog.

The latest driver version of the 5.x series (5.27) is compatible with Neo4j server both 4.4 and 5.x, so you can upgrade the driver before you upgrade the server. At the same time, the driver version 4.4 is forward compatible with Neo4j server 5.x, so you could also upgrade the server before the driver; however, given that it’s easier to roll back an application upgrade than a server upgrade, it’s recommended to start with the driver.

When upgrading the Neo4j server to a newer version, the Cypher queries in your application may also need updating.
See Cypher → Deprecations, additions, and compatibility.

New features

Support for .NET 8

The driver supports the .NET Standard 2.0. For supported versions of the .NET Framework, see the .NET Standard page.

Run transactions with less knowledge of driver’s internals

The new method Driver.ExecutableQuery() is a wrapper for Session.ExecuteRead/Write(), but it abstracts away the result processing part and returns a list of records to the caller directly.

For more information, see ExecutableQuery.

Record to object mapping

Allows records to be mapped to objects simply and without endless boilerplate.

For more information, see Record to Object Mapping.

Re-authentication

Allows for handling expiring authentication (backwards compatible) as well as session scoped authentication.

For more information, see Re-authentication.

Mutual TLS (mTLS) as second authentication factor (2FA)

Allows for configuring client side TLS certificates to authenticate against the server.

BookmarkManager support

Bookmark managers make it easier to achieve causal chaining of sessions.

Notification filtering API

Filtering allows to receive only a subset of notifications from the server, and to improve performance server-side.

For more information, see NotificationConfig.

GQL statuses and errors

The property IResultSummary.GqlStatusObjects contains a sequence of IGqlStatusObject, holding information about the execution of the query. This API is planned to supersede the current notifications API.

Telemetry

The driver sends anonymous API usage statistics to the server. Use the driver configuration method .WithTelemetryDisabled() to opt out.

Breaking changes and deprecations

Deprecated features are likely to be removed in version 6.

Version Message Status

5.0

IServerInfo — Method .Version() has been removed. Use .Agent(), .ProtocolVersion(), or call the dbms.components Cypher procedure instead.

Removed

5.0

ISession, IRxSession, IAsyncSession — Methods .ReadTransaction() and .WriteTransaction() are deprecated in favor of .ExecuteRead() and .ExecuteWrite(). The same holds for the async coounterparts .ReadTransactionAsync() and .WriteTransactionAsync(), replaced by .ExecuteReadAsync() and .ExecuteWriteAsync().

The new methods behave similarly, but the argument types are different and the new methods do not support the .commit(), .rollback(), .close(), and .closed() methods.

Deprecated

5.0

ISession, IAsyncSession — Method .LastBookmark() is deprecated in favor of .LastBookmarks().

Deprecated

5.0

Type Bookmark is deprecated in favor of Bookmarks.

Deprecated

5.0

SessionConfigBuilder — Method .WithBookmarks() takes Bookmarks[] as argument rather than Bookmark[].

Deprecated

5.0

ZonedDateTime — Two constructors not including DateTimeKind are deprecated (this and this).

Deprecated

5.0

IEntity, INode, IRelationship — Method .Id() (long) is deprecated in favor of .ElementId() (string).

Deprecated

5.0

IRelationship — Methods .StartNodeId() and .EndNodeId() are deprecated in favor of .StartNodeElementId() and .EndNodeElementId(). Old identifiers were long, wereas new ElementIds are string.

Deprecated

5.7

INotification — Property Severity is deprecated in favor of SeverityLevel or RawSeverityLevel.

Deprecated