Mohd2sh.CleanArchitecture.Core.Domain
1.0.0
dotnet add package Mohd2sh.CleanArchitecture.Core.Domain --version 1.0.0
NuGet\Install-Package Mohd2sh.CleanArchitecture.Core.Domain -Version 1.0.0
<PackageReference Include="Mohd2sh.CleanArchitecture.Core.Domain" Version="1.0.0" />
<PackageVersion Include="Mohd2sh.CleanArchitecture.Core.Domain" Version="1.0.0" />
<PackageReference Include="Mohd2sh.CleanArchitecture.Core.Domain" />
paket add Mohd2sh.CleanArchitecture.Core.Domain --version 1.0.0
#r "nuget: Mohd2sh.CleanArchitecture.Core.Domain, 1.0.0"
#:package Mohd2sh.CleanArchitecture.Core.Domain@1.0.0
#addin nuget:?package=Mohd2sh.CleanArchitecture.Core.Domain&version=1.0.0
#tool nuget:?package=Mohd2sh.CleanArchitecture.Core.Domain&version=1.0.0
CleanArchitecture.Core.Domain
Core domain abstractions and base types for Clean Architecture applications following Domain-Driven Design principles.
Purpose
This package provides base classes and interfaces for building domain models in Clean Architecture applications. It includes abstractions for entities, value objects, aggregate roots, and domain events.
Installation
dotnet add package Mohd2sh.CleanArchitecture.Core.Domain
Usage
Entity
public class Product : Entity<Guid>
{
public string Name { get; private set; }
private Product() { }
public Product(Guid id, string name)
{
Id = id;
Name = name;
}
}
Value Object
public record Money : ValueObject
{
public decimal Amount { get; init; }
public string Currency { get; init; }
protected override IEnumerable<object?> GetAtomicValues()
{
yield return Amount;
yield return Currency;
}
}
Aggregate Root
public class Order : AggregateRoot<Guid>
{
public string OrderNumber { get; private set; }
private Order() { }
public Order(Guid id, string orderNumber) : base(id)
{
OrderNumber = orderNumber;
}
}
Domain Event
public sealed record OrderCreatedEvent(Guid OrderId) : IDomainEvent;
Key Components
Entity<TId>- Base class for domain entitiesValueObject- Base class for value objectsAggregateRoot<TId>- Base class for aggregate roots with optimistic concurrencyIDomainEvent- Interface for domain eventsAuditableEntity<TId>- Base class with audit fields
Repository
GitHub: https://github.com/mohd2sh/CleanArchitecture-DDD-CQRS
License
MIT
| 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
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Mohd2sh.CleanArchitecture.Core.Domain:
| Package | Downloads |
|---|---|
|
Mohd2sh.CleanArchitecture.Core.Application
Core application layer abstractions, CQRS interfaces, and handler registration extensions for Clean Architecture. Includes ICommand, IQuery, IMediator interfaces, event handlers, and DI extensions for automatic handler discovery and registration. |
|
|
Mohd2sh.CleanArchitecture.Core.ArchitectureTests
Reusable architecture test base classes for Clean Architecture and DDD validation. Provides base test classes that consumers can inherit to enforce architectural rules and boundaries. |
|
|
Mohd2sh.CleanArchitecture.Core.Infrastructure
Core infrastructure implementations including custom mediator, event dispatchers, and dependency injection extensions for Clean Architecture. Provides ready-to-use implementations of IMediator, IDomainEventDispatcher, IIntegrationEventDispatcher with DI registration extensions. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 255 | 11/10/2025 |
| 1.0.0-alpha.6 | 141 | 11/10/2025 |
| 1.0.0-alpha.5 | 143 | 11/10/2025 |