Show / Hide Table of Contents

    Class DomainEntity

    The base class for the domain entities that encapsulate domain events.

    Inheritance
    object
    MessagesSource<IDomainEvent>
    DomainEntity
    Implements
    IMessagesSource
    Inherited Members
    MessagesSource<IDomainEvent>.GetMessages()
    MessagesSource<IDomainEvent>.ClearMessages()
    MessagesSource<IDomainEvent>.AddEvent(IDomainEvent)
    MessagesSource<IDomainEvent>.AddEvent<TEvent>(bool)
    MessagesSource<IDomainEvent>.RemoveEvent(IDomainEvent)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Domain
    Assembly: Silverback.Core.Model.dll
    Syntax
    public abstract class DomainEntity : MessagesSource<IDomainEvent>, IMessagesSource
    Remarks

    It's not mandatory to use this base class as long as long as the domain entities implement the IMessagesSource interface.

    Constructors

    DomainEntity()

    The base class for the domain entities that encapsulate domain events.

    Declaration
    protected DomainEntity()
    Remarks

    It's not mandatory to use this base class as long as long as the domain entities implement the IMessagesSource interface.

    Properties

    DomainEvents

    Gets the domain events that have been added but not yet published.

    Declaration
    [NotMapped]
    public IEnumerable<IDomainEvent> DomainEvents { get; }
    Property Value
    Type Description
    IEnumerable<IDomainEvent>
    Remarks

    It's not mandatory to use this base class as long as long as the domain entities implement the IMessagesSource interface.

    Implements

    IMessagesSource
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini