Skip to content

Gryd.Domain ​

DDD building blocks: Entity, AggregateRoot, ValueObject, and Domain Events.

Installation ​

bash dotnet add package Gryd.Domain

Overview ​

ComponentDescription
BaseEntityBase class for all entities with audit and soft delete
AggregateRootAggregate root with domain events
ValueObjectImmutable value objects
CurrencyCodeISO 4217 currency code value object
DomainEventDomain event base class
InterfacesIEntity, IAuditable, ISoftDeletable, IRequireTenant, IOptionalTenant, IAggregateRoot

Architecture ​

Gryd.Domain implements DDD tactical patterns:

  • Entity: Objects with identity that persists over time
  • Value Object: Immutable objects defined by their values
  • Aggregate Root: Transaction boundaries with domain events
  • Domain Event: Decouple side effects from business logic

Multi-tenancy Support ​

Built-in support for multi-tenant applications:

  • TenantScopedEntity: Entity with TenantId
  • TenantScopedAggregateRoot: Aggregate root with TenantId
  • IRequireTenant and IOptionalTenant markers for tenant filtering

Released under the MIT License.