Andrew.Domain.SharedKernel
1.1.2
See the version list below for details.
dotnet add package Andrew.Domain.SharedKernel --version 1.1.2
NuGet\Install-Package Andrew.Domain.SharedKernel -Version 1.1.2
<PackageReference Include="Andrew.Domain.SharedKernel" Version="1.1.2" />
<PackageVersion Include="Andrew.Domain.SharedKernel" Version="1.1.2" />
<PackageReference Include="Andrew.Domain.SharedKernel" />
paket add Andrew.Domain.SharedKernel --version 1.1.2
#r "nuget: Andrew.Domain.SharedKernel, 1.1.2"
#:package Andrew.Domain.SharedKernel@1.1.2
#addin nuget:?package=Andrew.Domain.SharedKernel&version=1.1.2
#tool nuget:?package=Andrew.Domain.SharedKernel&version=1.1.2
๐งฉ Domain.SharedKernel
Domain.SharedKernel is a clean, reusable shared library designed for Domain-Driven Design (DDD) applications. It encapsulates core domain logic, base entity definitions, ID generation, and abstraction contracts that can be shared across multiple bounded contexts or services.
๐ฆ Installation
Install it from NuGet:
.NET CLI
dotnet add package Andrew.Domain.SharedKernel
Package Manager
NuGet\Install-Package Andrew.Domain.SharedKernel
๐ฆ What's Included
โ BaseEntity
A common abstract base class for domain entities, providing:
- Identity management
- Domain event support (e.g., integration with MediatR)
This helps maintain consistency and reduce duplication across aggregate roots and entities.
๐ HashHelper
A utility class for generating secure hashes, such as:
- SHA256
- MD5
Useful for password storage, token generation, and data integrity checks.
โ๏ธ Snowflake ID Generator
Generates globally unique, time-based 64-bit identifiers using the Snowflake algorithm, ideal for distributed systems.
๐งฉ Core Abstractions
The library provides key interfaces for clean domain architecture:
IAggregateRoot
โ Indicates an aggregate root in the domain model.ICurrentUser
โ Provides access to user context such asUserId
,TenantId
.IUnitOfWork
โ Defines transactional boundaries for repository operations.
๐ Why Use a Shared Kernel?
The Shared Kernel pattern promotes:
- ๐ Consistency in domain design across projects
- ๐งผ Purity by decoupling domain logic from infrastructure
- ๐ Reusability of common logic across microservices
- ๐ Clarity through well-defined contracts and interfaces
๐ License
MIT License
๐ค Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve or extend the library.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- IdGen (>= 3.0.7)
- MediatR (>= 12.5.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Andrew.Domain.SharedKernel:
Package | Downloads |
---|---|
Andrew.Infrastructure.SharedKernel
Making it easier to use Infrastructure layer in DDD. Contains Unit of Work,AppHelper,Dbcontext,CurrentUser . |
GitHub repositories
This package is not used by any popular GitHub repositories.