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
DomainEventDomain event base class
InterfacesIEntity, IAuditable, ISoftDeletable, IHasTenant, 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
  • IHasTenant interface for tenant filtering

Released under the MIT License.