AuroraScienceHub.Framework.Entities 10.1.0

Prefix Reserved
dotnet add package AuroraScienceHub.Framework.Entities --version 10.1.0
                    
NuGet\Install-Package AuroraScienceHub.Framework.Entities -Version 10.1.0
                    
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="AuroraScienceHub.Framework.Entities" Version="10.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuroraScienceHub.Framework.Entities" Version="10.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AuroraScienceHub.Framework.Entities" />
                    
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 AuroraScienceHub.Framework.Entities --version 10.1.0
                    
#r "nuget: AuroraScienceHub.Framework.Entities, 10.1.0"
                    
#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 AuroraScienceHub.Framework.Entities@10.1.0
                    
#: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=AuroraScienceHub.Framework.Entities&version=10.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AuroraScienceHub.Framework.Entities&version=10.1.0
                    
Install as a Cake Tool

AuroraScienceHub.Framework.Entities

Core domain entity interfaces and patterns for building clean domain models in .NET applications.

Overview

Provides essential interfaces and abstractions for domain-driven design (DDD), including entity identification, auditing, soft deletion, and specification patterns.

Key Features

  • Strong Typed Identifiers - Type-safe entity IDs with value object semantics
  • Auditing Support - Built-in created/updated timestamp tracking
  • Soft Deletion - Mark entities as deleted without physical removal
  • Specification Pattern - Composable query specifications
  • Type Safety - Strongly typed interfaces prevent common errors

Installation

dotnet add package AuroraScienceHub.Framework.Entities

Core Interfaces

IEntity<TEntityId>

public class User : IEntity<UserId>
{
    public UserId Id { get; private set; }
    public string Name { get; set; }
}

IAuditable

public class Order : IEntity<OrderId>, IAuditable
{
    public OrderId Id { get; private set; }
    public DateTime CreatedAt { get; set; }
    public DateTime UpdatedAt { get; set; }
}

ISoftDeletable

public class Product : IEntity<ProductId>, ISoftDeletable
{
    public ProductId Id { get; private set; }
    public bool IsDeleted { get; set; }
    public DateTime? DeletedAt { get; set; }
}

Strong Typed Identifiers

// Define specific ID types
public sealed record UserId(Guid Value) : EntityId<Guid>(Value);
public sealed record OrderId(Guid Value) : EntityId<Guid>(Value);

// Use in entities
public class User : IEntity<UserId>
{
    public UserId Id { get; private set; }

    public User()
    {
        Id = new UserId(Guid.NewGuid());
    }
}

// Type safety prevents mistakes
void ProcessOrder(OrderId orderId)
{
    // ProcessOrder(userId); // Compiler error - type safety!
}

Specification Pattern

// Define specifications
public class ActiveProductsSpec : Specification<Product>
{
    public override Expression<Func<Product, bool>> ToExpression()
    {
        return product => !product.IsDeleted && product.IsActive;
    }
}

// Use with LINQ
var query = dbContext.Products.Where(activeSpec.ToExpression());

Complete Example

public sealed record UserId(Guid Value) : EntityId<Guid>(Value);

public class User : IEntity<UserId>, IAuditable, ISoftDeletable
{
    public UserId Id { get; private set; }
    public string Email { get; set; } = string.Empty;
    public DateTime CreatedAt { get; set; }
    public DateTime UpdatedAt { get; set; }
    public bool IsDeleted { get; set; }
    public DateTime? DeletedAt { get; set; }

    public User(string email)
    {
        Id = new UserId(Guid.NewGuid());
        Email = email;
        CreatedAt = DateTime.UtcNow;
        UpdatedAt = DateTime.UtcNow;
    }
}

License

See LICENSE file in the repository root.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
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 AuroraScienceHub.Framework.Entities:

Package Downloads
AuroraScienceHub.Framework.EntityFramework

Entity Framework Core extensions including custom converters, interceptors, migrations utilities, and storage patterns for DDD entities.

AuroraScienceHub.Framework.AspNetCore

ASP.NET Core extensions for composition, diagnostics, problem details (RFC 7807), security utilities, and routing enhancements.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.0 127 8/19/2026
10.0.8 127 8/14/2026
10.0.7 110 8/11/2026
10.0.6 110 8/11/2026
10.0.5 2,428 4/23/2026
10.0.4 144 4/23/2026
10.0.3 665 2/11/2026
10.0.2 762 1/29/2026
10.0.1 530 12/25/2025
10.0.0 467 12/11/2025
9.0.7 2,190 11/20/2025
9.0.6 242 11/15/2025
9.0.5 298 11/8/2025
9.0.4 271 10/24/2025
9.0.3 259 10/15/2025
9.0.2 241 10/15/2025
9.0.1 589 10/14/2025
9.0.1-workflow-test-2.17 157 10/14/2025