Class DeleteSnapshotsRequest
- Namespace
- Excalibur.EventSourcing.SqlServer.Requests
- Assembly
- Excalibur.EventSourcing.SqlServer.dll
Data request to delete all snapshots for an aggregate.
public sealed class DeleteSnapshotsRequest : DataRequestBase<IDbConnection, int>, IDataRequest<IDbConnection, int>, IDataRequest
- Inheritance
-
DeleteSnapshotsRequest
- Implements
- Inherited Members
Constructors
DeleteSnapshotsRequest(string, string, TenantScope, CancellationToken, string, string)
Initializes a new instance of the DeleteSnapshotsRequest class.
public DeleteSnapshotsRequest(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 is emitted unconditionally — an untenanted scope binds the reserved sentinel rather than omitting the term — so the delete is restricted to one partition's rows (
AND TenantId = @TenantId). This predicate is what keeps one tenant's erasure from deleting another tenant's snapshot of the same aggregate identifier — on a delete the omission destroys data rather than merely exposing it.cancellationTokenCancellationTokenThe cancellation token.
schemastringThe schema name for the snapshot store table. Default: "dbo".
tablestringThe snapshot store table name. Default: "EventStoreSnapshots".