Class GetLatestSnapshotRequest
- Namespace
- Excalibur.EventSourcing.SqlServer.Requests
- Assembly
- Excalibur.EventSourcing.SqlServer.dll
Data request to get the latest snapshot for an aggregate.
public sealed class GetLatestSnapshotRequest : DataRequestBase<IDbConnection, ISnapshot?>, IDataRequest<IDbConnection, ISnapshot?>, IDataRequest
- Inheritance
-
GetLatestSnapshotRequest
- Implements
- Inherited Members
Constructors
GetLatestSnapshotRequest(string, string, TenantScope, CancellationToken, string, string)
Initializes a new instance of the GetLatestSnapshotRequest class.
public GetLatestSnapshotRequest(string aggregateId, string aggregateType, TenantScope scope, CancellationToken cancellationToken, string schema = "dbo", string table = "EventStoreSnapshots")
Parameters
aggregateIdstringThe aggregate identifier.
aggregateTypestringThe aggregate type name.
scopeTenantScopeThe tenant scope. The tenant predicate and its parameter are emitted unconditionally — an untenanted scope binds the reserved sentinel — so the query is restricted to one partition's rows (
AND TenantId = @TenantId) in the same atomic statement. A tenant-scoped read cannot be constructed without a tenant, so a predicate-less all-tenants query while tenancy is active is unrepresentable.cancellationTokenCancellationTokenThe cancellation token.
schemastringThe schema name for the snapshot store table. Default: "dbo".
tablestringThe snapshot store table name. Default: "EventStoreSnapshots".