Shared : Domain

The Shared.Domain project provides the foundational abstractions for the Domain layer in a Domain-Driven Design architecture. It defines marker interfaces, a base entity class with domain event support, and contracts for repositories and services.

Domain Events

The IDomainEvent interface is a marker interface that all domain events must implement. It serves as a base contract for representing meaningful occurrences within the domain.

Entities

The entity abstractions provide a base class and interface for domain entities :
  • IEntity : An interface that exposes a read-only collection of domain events and a ClearDomainEvents method, defining the contract for any domain entity.
  • Entity<TEntityId> : An abstract base class implementing IEntity with a strongly-typed identifier. It provides a RaiseDomainEvent protected method to enqueue events and a ClearDomainEvents method to flush them after dispatch.

Repositories

The IDomainRepository interface is a marker interface that all domain repositories must implement. It serves as a base contract for persistence-related abstractions in the Domain layer.

Services

The IDomainService interface is a marker interface that all domain services must implement. It serves as a base contract for domain logic services that encapsulate business rules and operations.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.