CuriousGremlin is an alternative to Gremlin.Net that offers:
- Strongly-typed Gremlin queries
- Automatic mapping between C# classes and graph objects (Vertices and Edges)
- Graph client pooling
- Azure CosmosDB support
- .NET Framework and .NET Core support
- Generate a query:
using CuriousGremlin;
var query = VertexQuery.Create("label_name").Property("key_name", "value");
- Execute the query:
using CuriousGremlin.AzureCosmosDB;
...
var client = new GraphClient(endpoint, authKey);
using(client)
{
await client.Open("database_name", "collection_name");
var result = client.Execute(query);
}
- Manipulate results
using CuriousGremlin.Objects;
...
foreach(GraphVertex item in result)
{
Console.WriteLine("Vertex ID: " + item.id);
Console.WriteLine("Vertex Label: " + item.label);
}
- CuriousGremlin - .NET Standard library for strongly-typed Gremlin queries
- CuriousGremlin.AzureCosmosDB - A shared library containing a client for Azure CosmosDB used in the following two projects.
- CuriousGremlin.AzureCosmosDB.Framework - .NET Framework library for interfacing with Azure CosmosDB (using the Gremlin.Net NuGet package)
- CuriousGremlin.AzureCosmosDB.Core - .NET Core library for interfacing with Azure CosmosDB (uses Microsoft Azure CosmosDB NuGet package)
- [CuriousGremlin.UnitTests] - Shared library containing unit tests
- CuriousGremlin.UnitTests.Framework - Implementation of unit tests using the Azure CosmosDB emulator
In order to run the unit tests, the Azure CosmosDB emulator must be installed and running on the local machine. The unit tests assume default credentials when running the tests.