Table of Contents

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

aggregateId string

The aggregate identifier.

aggregateType string

The aggregate type name.

scope TenantScope

The 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.

cancellationToken CancellationToken

The cancellation token.

schema string

The schema name for the snapshot store table. Default: "dbo".

table string

The snapshot store table name. Default: "EventStoreSnapshots".