aalmuqahwi.BuildingBlocks.Domain
0.1.0
dotnet add package aalmuqahwi.BuildingBlocks.Domain --version 0.1.0
NuGet\Install-Package aalmuqahwi.BuildingBlocks.Domain -Version 0.1.0
<PackageReference Include="aalmuqahwi.BuildingBlocks.Domain" Version="0.1.0" />
<PackageVersion Include="aalmuqahwi.BuildingBlocks.Domain" Version="0.1.0" />
<PackageReference Include="aalmuqahwi.BuildingBlocks.Domain" />
paket add aalmuqahwi.BuildingBlocks.Domain --version 0.1.0
#r "nuget: aalmuqahwi.BuildingBlocks.Domain, 0.1.0"
#:package aalmuqahwi.BuildingBlocks.Domain@0.1.0
#addin nuget:?package=aalmuqahwi.BuildingBlocks.Domain&version=0.1.0
#tool nuget:?package=aalmuqahwi.BuildingBlocks.Domain&version=0.1.0
BuildingBlocks
Reusable Domain/Application/Infrastructure building blocks — DDD, Clean Architecture, CQRS, and Modular Monolith patterns — for .NET.
Status
🚧 Actively developed — built to learn NuGet packaging and reduce copy-paste across my own projects. APIs may still change.
Packages
BuildingBlocks.Domain
Core DDD primitives, no external dependencies.
Result/Error— success/failure without exceptionsEntity<TId>/AggregateRoot<TId>— equality by ID, domain event trackingDomainEvent/IDomainEvent— immutable facts raised by aggregatesValueObject— base for immutable, structurally-equal types
BuildingBlocks.Application
CQRS and cross-cutting contracts, depends only on BuildingBlocks.Domain.
ICommand/IQuery<TResult>— request markersICommandHandler<,>/IQueryHandler<,>— handler contractsIDispatcher— routes commands/queries to their handlersIPipelineBehavior<,>— cross-cutting middleware around handler execution (logging, validation, etc.)IUnitOfWork— persistence flush abstraction, technology-agnosticIDomainEventHandler<>/IDomainEventDispatcher— domain event handling contracts
BuildingBlocks.Infrastructure
Concrete DI-based implementations, depends on BuildingBlocks.Application.
Dispatcher— resolves and invokes command/query handlers via keyed DI, runs pipeline behaviorsDomainEventDispatcher— resolves and invokes all registered handlers for a given domain eventAddBuildingBlocksInfrastructure(...)— one-line registration for everything above (or callAddDispatcher(...)/AddDomainEventDispatcher(...)individually)
Usage
// Program.cs
builder.Services.AddBuildingBlocksInfrastructure(typeof(Program).Assembly);
// Somewhere in your app
public record CreateOrderCommand(string ProductId) : ICommand<Result<Guid>>;
public class CreateOrderHandler : ICommandHandler<CreateOrderCommand, Result<Guid>>
{
public Task<Result<Guid>> Handle(CreateOrderCommand command, CancellationToken ct)
=> Task.FromResult(Result.Success(Guid.NewGuid()));
}
// Dispatching
var result = await dispatcher.SendAsync(new CreateOrderCommand("prod-123"));
Design notes
Domainhas zero dependencies by design — it's safe to reference from anywhereIUnitOfWorkand persistence are intentionally technology-agnostic — bring your own EF Core/Dapper/etc. implementation
| 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on aalmuqahwi.BuildingBlocks.Domain:
| Package | Downloads |
|---|---|
|
aalmuqahwi.BuildingBlocks.Application
CQRS and cross-cutting contracts — ICommand, IQuery, IDispatcher, IPipelineBehavior, IUnitOfWork, IIntegrationEvent, IOutboxWriter, IOutboxMessageStore, IOutboxProcessor. Depends on BuildingBlocks.Domain. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 163 | 7/24/2026 |