Class ConcurrencyException
- Namespace
- Stratara.Abstractions.EventSourcing
- Assembly
- Stratara.Abstractions.dll
Thrown by SaveChangesAsync(CancellationToken) when another writer committed to the same stream first and the optimistic version check fails. Callers should re-aggregate and retry the operation idempotently.
public sealed class ConcurrencyException : Exception, ISerializable
- Inheritance
-
ConcurrencyException
- Implements
- Inherited Members
- Extension Methods
Constructors
ConcurrencyException(Guid, string, Exception?)
Initialise a new ConcurrencyException.
public ConcurrencyException(Guid streamId, string aggregateTypeName, Exception? innerException = null)
Parameters
streamIdGuidThe stream that lost the race.
aggregateTypeNamestringThe aggregate type bound to the stream — for diagnostics.
innerExceptionExceptionOptional inner exception (typically the underlying DB exception).
Properties
AggregateTypeName
The aggregate type bound to the stream.
public string AggregateTypeName { get; }
Property Value
StreamId
The stream id that experienced the concurrent write.
public Guid StreamId { get; }