Search Results for

    Show / Hide Table of Contents

    Class AggregateRoot

    Base class for aggregate roots with built‑in domain event collection.

    Inheritance
    object
    AggregateRoot
    Implements
    IAggregateRoot
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Chapar.Core.Abstractions
    Assembly: Chapar.Core.dll
    Syntax
    public abstract class AggregateRoot : IAggregateRoot

    Properties

    | Edit this page View Source

    DomainEvents

    Gets the domain events that have been raised but not yet dispatched.

    Declaration
    public IReadOnlyCollection<IDomainEvent> DomainEvents { get; }
    Property Value
    Type Description
    IReadOnlyCollection<IDomainEvent>

    Methods

    | Edit this page View Source

    AddDomainEvent(IDomainEvent)

    Adds a domain event to the aggregate's internal collection.

    Declaration
    public void AddDomainEvent(IDomainEvent domainEvent)
    Parameters
    Type Name Description
    IDomainEvent domainEvent
    | Edit this page View Source

    ClearDomainEvents()

    Clears all domain events, usually after they have been dispatched.

    Declaration
    public void ClearDomainEvents()

    Implements

    IAggregateRoot
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2026