Stardust.Paradox.Data.Annotations 2.3.3

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Stardust.Paradox.Data.Annotations --version 2.3.3
                    
NuGet\Install-Package Stardust.Paradox.Data.Annotations -Version 2.3.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Stardust.Paradox.Data.Annotations" Version="2.3.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Stardust.Paradox.Data.Annotations" Version="2.3.3" />
                    
Directory.Packages.props
<PackageReference Include="Stardust.Paradox.Data.Annotations" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Stardust.Paradox.Data.Annotations --version 2.3.3
                    
#r "nuget: Stardust.Paradox.Data.Annotations, 2.3.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Stardust.Paradox.Data.Annotations@2.3.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Stardust.Paradox.Data.Annotations&version=2.3.3
                    
Install as a Cake Addin
#tool nuget:?package=Stardust.Paradox.Data.Annotations&version=2.3.3
                    
Install as a Cake Tool

Stardust.Paradox.Data.Annotations

Core annotations and interfaces for the Stardust.Paradox.Data graph database toolkit.

Overview

This package provides the essential attributes, interfaces, and data types needed to define graph entities and relationships in Stardust.Paradox.Data. It contains the foundational components for modeling vertices, edges, and their properties in a type-safe manner.

Key Components

Core Interfaces

  • IVertex - Base interface for all vertex entities
  • IEdge - Base interface for all edge entities
  • IGraphEntity - Common interface for graph elements
  • IGraphSet<T> - Collection interface for graph entity sets

Vertex Annotations

  • [VertexLabel] - Specifies the label for a vertex type
  • [VertexProperty] - Marks properties as vertex properties
  • [PropertyKey] - Defines property keys with metadata

Edge Annotations

  • [EdgeLabel] - Specifies the label for an edge type (⚠️ Obsolete - use InLabelAttribute)
  • [ReverseEdgeLabel] - Specifies reverse edge labels (⚠️ Obsolete - use OutLabelAttribute)
  • [InLabelAttribute] - Defines incoming edge relationships
  • [OutLabelAttribute] - Defines outgoing edge relationships

Special Data Types

  • EpochDateTime - DateTime type that serializes as Unix epoch timestamps
  • Property<T> - Wrapper for graph properties with metadata

Installation

dotnet add package Stardust.Paradox.Data.Annotations

Usage Examples

Basic Vertex Definition

using Stardust.Paradox.Data.Annotations;

[VertexLabel("person")]
public class Person : IVertex
{
    public string Id { get; set; }
    
    [PropertyName("full_name")]
    public string Name { get; set; }
    
    public int Age { get; set; }
    
    [JsonProperty("birth_date")]
    public EpochDateTime BirthDate { get; set; }
    
    // Navigation properties
    [OutLabel("knows")]
    public ICollection<Person> Friends { get; set; }
    
    [InLabel("worksFor")]
    public Company Employer { get; set; }
    
    [Ignore]
    public string ComputedProperty => $"{Name} ({Age})";
}

Edge Definition

[EdgeLabel("friendship")]
public class Friendship : IEdge
{
    public string Id { get; set; }
    public string InVertexId { get; set; }
    public string OutVertexId { get; set; }
    
    public EpochDateTime Since { get; set; }
    public string Strength { get; set; } // "weak", "strong"
}

Property Wrappers

public class PersonWithMetadata : IVertex
{
    public string Id { get; set; }
    
    // Simple property
    public string Name { get; set; }
    
    // Property with metadata
    public Property<int> Age { get; set; }
    
    // Access property value and metadata
    public void Example()
    {
        Age.Value = 30;
        Age.Key = "age";
        var ageValue = Age.Value; // 30
    }
}

EpochDateTime Usage

public class Event : IVertex
{
    public string Id { get; set; }
    public string Name { get; set; }
    
    // Automatically converts to/from Unix timestamp
    public EpochDateTime Timestamp { get; set; }
    
    public void SetToNow()
    {
        Timestamp = EpochDateTime.Now;
    }
    
    public DateTime AsDateTime()
    {
        return Timestamp.ToDateTime();
    }
}

Migration from Obsolete Attributes

// OLD (Obsolete)
[EdgeLabel("knows")]
public ICollection<Person> Friends { get; set; }

[ReverseEdgeLabel("worksFor")]  
public ICollection<Person> Employees { get; set; }

// NEW (Recommended)
[InLabel("knows")]
public ICollection<Person> Friends { get; set; }

[OutLabel("worksFor")]
public ICollection<Person> Employees { get; set; }

Compatibility

  • .NET Standard 2.0 - Compatible with .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5+
  • Multi-targeting - Supports modern .NET versions when used with the main Stardust.Paradox.Data package

Dependencies

  • Microsoft.Extensions.DependencyInjection.Abstractions (2.1.1)
  • Newtonsoft.Json (13.0.1)

Documentation

For complete documentation and examples:

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Tags: CosmosDB, Gremlin, TinkerPop, EntityFramework, Annotations, Graph Database

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Stardust.Paradox.Data.Annotations:

Package Downloads
Stardust.Paradox.Data

Entityframework styled tool for accessing gremlin based graph databases like CosmosDB and Apache Tinkerpop

Stardust.Paradox.Data.Linq

Powerful LINQ to Gremlin query provider for Stardust.Paradox graph database framework. Write natural C# LINQ queries that are automatically translated to efficient Gremlin traversals for CosmosDB, Apache TinkerPop, and other Gremlin-compatible graph databases. Features include full LINQ support (Where, Select, OrderBy, GroupBy, aggregations), type-safe graph traversals (Out, In, OutE, InE), lambda expressions, pattern matching, set operations, and async/await support. Perfect for Entity Framework-style graph database development with IntelliSense and compile-time checking.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.0-rc2 252 10/31/2025
2.3.3 794 10/7/2025
2.3.2 13,046 1/13/2020
2.3.1 1,005 1/8/2020
2.3.0 1,854 12/2/2019
2.2.0 1,445 11/12/2019
2.1.0 4,060 4/2/2019
2.0.1 1,898 3/27/2019
2.0.0 3,032 2/20/2019
2.0.0-pre06 1,485 2/14/2019
2.0.0-pre05 3,149 1/25/2019
2.0.0-pre03 934 1/23/2019
2.0.0-pre02 1,024 1/16/2019
2.0.0-pre01 865 12/5/2018
1.3.3 2,059 11/28/2018
1.3.2 1,945 11/6/2018
1.3.0 4,071 8/23/2018
1.0.1 3,574 8/10/2018
1.0.0-pre003 1,560 7/3/2018
1.0.0-pre002 1,382 7/3/2018
1.0.0-pre001 1,804 6/11/2018