All Projects → gy2006 → Neo4j Dotnet Ogm

gy2006 / Neo4j Dotnet Ogm

Licence: gpl-3.0
Neo4j Object Graph Mapping Library for .NET

Projects that are alternatives of or similar to Neo4j Dotnet Ogm

Devchatterbot
Stars: ✭ 60 (-13.04%)
Mutual labels:  dotnet-core
Waypoint
Opinionated solution template for building F# OSS libraries and tools.
Stars: ✭ 65 (-5.8%)
Mutual labels:  dotnet-core
Elf
The .NET 5 link forward service runs on Microsoft Azure
Stars: ✭ 68 (-1.45%)
Mutual labels:  dotnet-core
Ionic Example App
A Ionic Example App (previously known as ionic 2 examples). Contains different examples on how to use the Ionic Framework
Stars: ✭ 61 (-11.59%)
Mutual labels:  dotnet-core
Obsidian Neo4j Graph View
Neo4j Graph View is a more functional graph view to Obsidian. It connects to a Neo4j database, allowing useful querying and visualization options.
Stars: ✭ 65 (-5.8%)
Mutual labels:  neo4j
Drinkandgo
A simple eCommerce App build on top of Asp.Net Core MVC framework.
Stars: ✭ 65 (-5.8%)
Mutual labels:  dotnet-core
Pioneer Console Boilerplate
Dependency injection, logging and configuration in a .NET Core console application.
Stars: ✭ 60 (-13.04%)
Mutual labels:  dotnet-core
Neo4j Symfony
Symfony Bundle for the Neo4j Graph Database
Stars: ✭ 69 (+0%)
Mutual labels:  neo4j
Stl.fusion.samples
A collection of samples for Fusion library: https://github.com/servicetitan/Stl.Fusion
Stars: ✭ 65 (-5.8%)
Mutual labels:  dotnet-core
Enums.net
Enums.NET is a high-performance type-safe .NET enum utility library
Stars: ✭ 1,151 (+1568.12%)
Mutual labels:  dotnet-core
Icanpay.donet
统一支付网关。支持NET46和NETSTANDARD2_0。支持支付宝,微信,银联支付渠道通过Web,App,Wap,QRCode方式支付。简化订单的创建、查询、退款跟接收网关返回的支付通知等功能
Stars: ✭ 62 (-10.14%)
Mutual labels:  dotnet-core
Skater .net Obfuscator
Skater .NET Obfuscator is an obfuscation tool for .NET code protection. It implements all known software protection techniques and obfuscation algorithms.
Stars: ✭ 64 (-7.25%)
Mutual labels:  dotnet-core
Movies Java Bolt
Neo4j Movies Example application with SparkJava backend using the neo4j-java-driver
Stars: ✭ 66 (-4.35%)
Mutual labels:  neo4j
Aspnetboilerplate Core Ng
Tutorial for ASP.NET Boilerplate Core + Angular
Stars: ✭ 61 (-11.59%)
Mutual labels:  dotnet-core
Scorm Learningmanagementsystem
Open Source SCORM Learning Management System demo
Stars: ✭ 68 (-1.45%)
Mutual labels:  dotnet-core
Neo4j Graphql
An optimized neo4j query resolver for Facebook's GraphQL
Stars: ✭ 60 (-13.04%)
Mutual labels:  neo4j
Cppast.codegen
An extensible library providing C# PInvoke codegen from C/C++ files for .NET
Stars: ✭ 65 (-5.8%)
Mutual labels:  dotnet-core
Neo4j Clj
Clojure bindings for Bolt / the Java Neo4j driver, complete with Joplin support for managing database migrations.
Stars: ✭ 70 (+1.45%)
Mutual labels:  neo4j
Xunit Logging
Logging extensions for xunit
Stars: ✭ 69 (+0%)
Mutual labels:  dotnet-core
Poke
A powerful reflection module for powershell.
Stars: ✭ 66 (-4.35%)
Mutual labels:  dotnet-core

neo4j-dotnet-ogm

Neo4j Object Graph Mapping Library for .NET

https://www.nuget.org/packages/Neo4jOgm/

Installation

Install-Package Neo4jOgm -Version 0.21.8

Quick start

Declare domain entities

[NeoNodeEntity("person", "p")]
public class Person
{
    [NeoNodeId]
    public long? Id { get; set; }
    
    public string Name { get; set; }
    
    [NeoRelationship("ARE_FRIENDS")]
    public List<Person> Friends { get; set; }
    
    [NeoCreatedAt]
    public DateTime? CreatedAt { get; set; }
    
    [NeoUpdatedAt]
    public DateTime? UpdatedAt { get; set; }
    
    [NeoIgnored]
    public string Extra { get; set; }
}

Setup

// make neo4j connection
var authToken = AuthTokens.Basic("neo4j", "12345");
var driver = GraphDatabase.Driver("bolt://localhost:7687", authToken);

// create context by Assembly and load entities
var context = new NeoContext(Assembly.GetExecutingAssembly());

// new repoistory
var repository = new NeoRepository(driver, "neo4j", context);


// Create an entity with relationship
var a = new Person {Name = "A"};
var b = new Person {Name = "B"};
a.Friends = new List<Person> {b};
var created = repository.Create(a);

// Update entity
created.Name = "New name"
repository.Update(created);

// Load entity and relationship by id
var loaded = repository.FindById<Person>(created.Id.Value, new RelationshipOption(){Load = true, Depth = 5});

// Find all entities and relationship with criteria
var crteria = new Criteria("Name", Operator.Equal, "A")
        .Or(new Criteria("Name", Operator.Equal, "B"));
        
var page = repository.FindAll<Person>(new PageRequest(1, 5), crteria, new RelationshipOption {Load = true});

// Delete entity and relationship by id
repository.DeleteById<Person>(created.Id.Value, true);

// Delete all
repository.DeleteAll<Person>();

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].