ResQ.BuildingBlocks.Domain 0.2.0

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

ResQ.BuildingBlocks.Domain

The inner core of the hexagon — dependency-free DDD primitives. No infrastructure, no frameworks.

Type Purpose
Entity<TId> Identity-based equality; raises/holds IDomainEvents
AggregateRoot<TId> The consistency boundary; what repositories load/save
ValueObject Immutable, equal-by-components
IDomainEvent Something meaningful that happened in the domain
Result / Result<T> / Error Explicit success/failure — no exceptions for expected failures
Guard Invariant enforcement at domain boundaries
public sealed class Widget : AggregateRoot<Guid>
{
    private Widget(Guid id, string sku) : base(id) => Sku = sku;
    public string Sku { get; }

    public static Result<Widget> Create(string sku) =>
        string.IsNullOrWhiteSpace(sku)
            ? Result.Failure<Widget>(Error.Validation("widget.sku_required", "SKU is required."))
            : new Widget(Guid.NewGuid(), sku);
}

Apache-2.0 · part of resq-software/dotnet.

Product 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on ResQ.BuildingBlocks.Domain:

Package Downloads
ResQ.BuildingBlocks.Application

Application-core abstractions — CQRS command/query contracts, the driven-port interfaces (IUnitOfWork, IClock, IDomainEventDispatcher), and cross-cutting pipeline behaviors (validation, logging). Depends only on the domain core.

ResQ.BuildingBlocks.Adapters.Messaging

Broker-agnostic messaging adapter — implements the application's integration-event ports over an in-memory System.Threading.Channels transport, with System.Text.Json serialization, a concurrency-bounded and idempotent BackgroundService consumer (Polly retry + dead-lettering), and DI wiring. Ships no broker client.

ResQ.BuildingBlocks.ServiceDefaults

Aspire-style cross-cutting service defaults — one call wires OpenTelemetry (traces, metrics, logs), health checks, service discovery, standard HTTP resilience, and a testable IClock. Also ships the CQRS observability pipeline behaviors (tracing + metrics), strongly-typed options registration, and a Polly resilience-pipeline helper keyed on the domain ErrorType.

ResQ.BuildingBlocks.Adapters.Web

HTTP driving adapter for the ResQ building blocks — a minimal-API surface that maps the Result/Error model to RFC 7807 ProblemDetails, plus endpoint discovery, FluentValidation endpoint filters, correlation middleware, API versioning, OpenAPI/Scalar, a config-bound CORS allowlist, and one ordered AddResqWeb/UseResqWeb wiring. Depends only on the application and domain cores.

ResQ.BuildingBlocks.Adapters.Persistence

EF Core 9 persistence adapter — the scoped EfUnitOfWork that dispatches domain events before saving, a specification-driven Repository/ReadRepository, an audit interceptor, and a transactional outbox plus inbox idempotency. Provider-agnostic (references only EF Core + Relational); depends only on the application and domain cores.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 512 8/16/2026