AuroraScienceHub.Framework.Entities
11.4.0
Prefix Reserved
dotnet add package AuroraScienceHub.Framework.Entities --version 11.4.0
NuGet\Install-Package AuroraScienceHub.Framework.Entities -Version 11.4.0
<PackageReference Include="AuroraScienceHub.Framework.Entities" Version="11.4.0" />
<PackageVersion Include="AuroraScienceHub.Framework.Entities" Version="11.4.0" />
<PackageReference Include="AuroraScienceHub.Framework.Entities" />
paket add AuroraScienceHub.Framework.Entities --version 11.4.0
#r "nuget: AuroraScienceHub.Framework.Entities, 11.4.0"
#:package AuroraScienceHub.Framework.Entities@11.4.0
#addin nuget:?package=AuroraScienceHub.Framework.Entities&version=11.4.0
#tool nuget:?package=AuroraScienceHub.Framework.Entities&version=11.4.0
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 | Versions 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. net11.0 is compatible. |
-
net10.0
- AuroraScienceHub.Framework.Exceptions (>= 11.4.0)
- AuroraScienceHub.Framework.Utilities (>= 11.4.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0)
-
net11.0
- AuroraScienceHub.Framework.Exceptions (>= 11.4.0)
- AuroraScienceHub.Framework.Utilities (>= 11.4.0)
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, routing enhancements, and output caching. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.4.0 | 127 | 11/19/2026 |
| 11.3.0 | 147 | 11/14/2026 |
| 11.2.0 | 87 | 11/13/2026 |
| 11.1.1 | 94 | 11/8/2026 |
| 11.1.0 | 90 | 11/5/2026 |
| 11.0.1 | 124 | 10/19/2026 |
| 11.0.1-feature-nuget-truste... | 98 | 10/16/2026 |
| 11.0.0 | 97 | 10/16/2026 |
| 10.1.0 | 1,779 | 8/19/2026 |
| 10.0.8 | 187 | 8/14/2026 |
| 10.0.7 | 160 | 8/11/2026 |
| 10.0.6 | 155 | 8/11/2026 |
| 10.0.5 | 2,538 | 4/23/2026 |
| 10.0.4 | 177 | 4/23/2026 |
| 10.0.3 | 828 | 2/11/2026 |
| 10.0.2 | 1,084 | 1/29/2026 |
| 10.0.1 | 619 | 12/25/2025 |
| 10.0.0 | 515 | 12/11/2025 |
| 9.0.7 | 2,773 | 11/20/2025 |
| 9.0.6 | 270 | 11/15/2025 |