Skip to content

Domain Interfaces

Core abstractions for domain entities.

IEntity

MemberTypeDescription
IdGuidUnique identifier
CreatedAtDateTimeCreation timestamp
IsDeletedboolSoft delete flag

IEntity<TKey>

Same as IEntity but with custom key type.

IAuditable

MemberTypeDescription
CreatedAtDateTimeCreation timestamp
UpdatedAtDateTime?Last update timestamp
CreatedByGuid?Creator ID
UpdatedByGuid?Last updater ID

ISoftDeletable

MemberTypeDescription
IsDeletedboolDeleted flag
DeletedAtDateTime?Deletion timestamp
DeletedByGuid?Who deleted
Delete(Guid?)voidMark as deleted
Restore()voidRestore entity

IHasTenant

MemberTypeDescription
TenantIdGuidTenant identifier

IAggregateRoot

MemberTypeDescription
DomainEventsIReadOnlyCollection<DomainEvent>Pending events
AddDomainEvent(DomainEvent)voidAdd event
RemoveDomainEvent(DomainEvent)voidRemove event
ClearDomainEvents()voidClear all events

Released under the MIT License.