Neo4j.Berries.OGM
1.1.0-preview1
See the version list below for details.
dotnet add package Neo4j.Berries.OGM --version 1.1.0-preview1
NuGet\Install-Package Neo4j.Berries.OGM -Version 1.1.0-preview1
<PackageReference Include="Neo4j.Berries.OGM" Version="1.1.0-preview1" />
paket add Neo4j.Berries.OGM --version 1.1.0-preview1
#r "nuget: Neo4j.Berries.OGM, 1.1.0-preview1"
// Install Neo4j.Berries.OGM as a Cake Addin #addin nuget:?package=Neo4j.Berries.OGM&version=1.1.0-preview1&prerelease // Install Neo4j.Berries.OGM as a Cake Tool #tool nuget:?package=Neo4j.Berries.OGM&version=1.1.0-preview1&prerelease
Neo4j berries OGM
This repository is home to berrybeat's dotnet OGM (Object-Graph-Mapping) library for neo4j. It supports basic queries, create, update, connect/disconnect relations.
Installation
This library is available in nuget and can be installed with the following command:
dotnet add package Neo4j.Berries.OGM
Note: This is a dotnet 8 specific library.
Basic Usage
The following snippet demonstrates the idea of how this library will be used with dependency injection.
public class MoviesController(ApplicationGraphContext graphContext): ControllerBase
{
[HttpPost]
public async Task Create(Movie request)
{
graphContext.Movies.Add(request);
await graphContext.SaveChangesAsync();
}
[HttpPost]
public async Task Update(Movie request)
{
await graphContext.Movies
.Match(x => x.Where(y => y.Id, request.Id))
.UpdateAsync(x => x.Set(request)) //Sets the whole object
}
}
The queries as you see are not supported with LINQ and instead you need to use the designed Eloquent. Also to use the library you need to add the following to your appsettings.json
.
{
"Neo4j": {
"Url": "<neo4j-address>",
"Username": "<neo4j-user>",
"Password": "<neo4j-password>",
"Database": "<neo4j-database-name>"
}
}
- Neo4j.Url: This is the url to neo4j. For example:
http://localhost:7687
- Neo4j.Username: The username for your database
- Neo4j.Password: The password for your database
- Neo4j.Database: This is optional. If not passed, it will connect to the default database. If passed, it will connect to the passed database.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Neo4j.Driver (>= 5.18.0)
- Neo4j.Driver.Simple (>= 5.18.0)
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 |
---|---|---|
1.3.0-preview-9 | 581 | 9/3/2024 |
1.3.0-preview-8 | 372 | 7/30/2024 |
1.3.0-preview-7 | 103 | 7/24/2024 |
1.3.0-preview-6 | 151 | 7/23/2024 |
1.3.0-preview-5 | 116 | 7/18/2024 |
1.3.0-preview-4 | 527 | 6/10/2024 |
1.3.0-preview-3 | 224 | 6/5/2024 |
1.3.0-preview-2 | 100 | 6/4/2024 |
1.3.0-preview-13 | 673 | 9/3/2024 |
1.3.0-preview-12 | 84 | 9/3/2024 |
1.3.0-preview-11 | 86 | 9/3/2024 |
1.3.0-preview-10 | 85 | 9/3/2024 |
1.3.0-preview-1 | 89 | 6/2/2024 |
1.2.0 | 818 | 5/18/2024 |
1.2.0-preview-8 | 245 | 5/9/2024 |
1.2.0-preview-7 | 207 | 5/2/2024 |
1.2.0-preview-6 | 61 | 5/2/2024 |
1.2.0-preview-5 | 102 | 4/26/2024 |
1.2.0-preview-4 | 115 | 4/26/2024 |
1.2.0-preview-3 | 112 | 4/25/2024 |
1.2.0-preview-2 | 95 | 4/25/2024 |
1.1.0 | 174 | 4/8/2024 |
1.1.0-preview3 | 86 | 4/5/2024 |
1.1.0-preview2 | 90 | 4/4/2024 |
1.1.0-preview1 | 112 | 4/3/2024 |
1.0.0 | 145 | 4/1/2024 |
1.0.0-preview-3 | 99 | 3/28/2024 |
1.0.0-preview-2 | 146 | 3/26/2024 |