Struct EventSubject
- Namespace
- Stratara.Abstractions.EventSourcing
- Assembly
- Stratara.Abstractions.dll
Explicit Subject (data owner) for an event-source append. Used by AppendOnBehalfOfAsync<TAggregate>(Guid, object, EventSubject, CancellationToken) when an event belongs to a different owner than the one the store would resolve for it — the stream's recorded owner, a creation event's tenant, or the tenant in the session.
public readonly record struct EventSubject : IEquatable<EventSubject>
- Implements
- Inherited Members
- Extension Methods
Constructors
EventSubject(Guid, Guid?)
Explicit Subject (data owner) for an event-source append. Used by AppendOnBehalfOfAsync<TAggregate>(Guid, object, EventSubject, CancellationToken) when an event belongs to a different owner than the one the store would resolve for it — the stream's recorded owner, a creation event's tenant, or the tenant in the session.
public EventSubject(Guid TenantId, Guid? UserId = null)
Parameters
TenantIdGuidThe Subject tenant id.
UserIdGuid?Optional Subject user id —
nullwhen the aggregate isn't user-scoped.
Properties
TenantId
The Subject tenant id.
public Guid TenantId { get; init; }
Property Value
UserId
Optional Subject user id — null when the aggregate isn't user-scoped.
public Guid? UserId { get; init; }
Property Value
- Guid?