Class Snapshot
- Namespace
- Stratara.Abstractions.EventSourcing
- Assembly
- Stratara.Abstractions.dll
Aggregate snapshot — periodic state capture that lets the aggregation service skip replaying every event from the start of a stream.
[ExcludeFromCodeCoverage]
public sealed class Snapshot : IEntity, IMultiTenant, IBucket, IHasRowVersion
- Inheritance
-
Snapshot
- Implements
- Inherited Members
- Extension Methods
Remarks
TenantId is the Subject (data owner) of the aggregate — same value as TenantId for the underlying stream.
Properties
AggregateTypeName
Assembly-qualified type name of the owning aggregate, as produced when the snapshot is written. It carries the assembly version, so reads must match it version-independently (see GetAsync(Guid, string, long?, CancellationToken)).
public required string AggregateTypeName { get; set; }
Property Value
BucketId
The bucket index in [0, BucketCount).
public required int BucketId { get; set; }
Property Value
DataJson
Serialised aggregate state as JSON.
public required string DataJson { get; set; }
Property Value
Id
The entity's primary-key identifier.
public Guid Id { get; set; }
Property Value
RowVersion
Current row version as read from xmin. Set by EF Core on save.
public uint RowVersion { get; set; }
Property Value
StreamId
Id of the stream the snapshot captures.
public Guid StreamId { get; set; }
Property Value
TenantId
The Subject (data-owner) tenant id.
public required Guid TenantId { get; set; }
Property Value
Timestamp
When the snapshot was written.
public DateTimeOffset Timestamp { get; set; }
Property Value
Version
Stream version the snapshot reflects (inclusive).
public long Version { get; set; }