Rwx.Domain
0.3.1
dotnet add package Rwx.Domain --version 0.3.1
NuGet\Install-Package Rwx.Domain -Version 0.3.1
<PackageReference Include="Rwx.Domain" Version="0.3.1" />
<PackageVersion Include="Rwx.Domain" Version="0.3.1" />
<PackageReference Include="Rwx.Domain" />
paket add Rwx.Domain --version 0.3.1
#r "nuget: Rwx.Domain, 0.3.1"
#:package Rwx.Domain@0.3.1
#addin nuget:?package=Rwx.Domain&version=0.3.1
#tool nuget:?package=Rwx.Domain&version=0.3.1
Rwx.Domain
Domain building blocks for the Rwx framework: entities, aggregate roots, domain events, result types, repository contracts, and specifications.
Install
dotnet add package Rwx.Domain --version 0.1.0
Use
using Rwx.Domain;
public sealed class Order : AggregateRoot
{
public string Number { get; private set; } = string.Empty;
public void Confirm()
{
AddDomainEvent(new OrderConfirmed(Id));
}
}
public sealed record OrderConfirmed(Guid OrderId) : IDomainEvent;
Entity provides identity, audit fields, soft-delete, organization scope (OrgId/DepartmentId), and immutable creation ownership (OwnerOrgId/OwnerDepartmentId/OwnerUserId). When Rwx.Persistence.EfCore's AuditableEntityInterceptor is attached, it invokes the entity audit/ownership setters automatically on SaveChanges; domain code does not set infrastructure audit fields itself. AggregateRoot additionally collects domain events for dispatch after persistence succeeds.
Use Result and Error for expected business failures, IRepository<T> and ISpecification<T> for reusable query criteria. Transaction boundaries live in the independent Rwx.UnitOfWork module.
This package contains no persistence or DI implementation; add Rwx.Persistence.EfCore when using Entity Framework Core.
Boundaries
An aggregate is the only place for its business invariants. Raise IDomainEvent to describe a completed domain fact, but do not publish broker messages, inject services, call repositories, or access EF/HTTP infrastructure from an entity. An application handler translates a completed use case into integration work when appropriate.
| 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 (4)
Showing the top 4 NuGet packages that depend on Rwx.Domain:
| Package | Downloads |
|---|---|
|
Rwx.Application
Package Description |
|
|
Rwx.Persistence.EfCore
Package Description |
|
|
Rwx.AspNet
Package Description |
|
|
Rwx.Authorization
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.