Home OptimisticConcurrencyException Class
Post
Cancel

OptimisticConcurrencyException Class

Definition

Namespace: EntityDb.Common.Exceptions
Assembly: EntityDb.Common

The exception that is logged when an actor passes a ITransaction to an ITransactionRepository with a PreviousEntityVersionNumber that is not the actual previous version number.

1
public sealed class OptimisticConcurrencyException : System.Exception

Inheritance: Object → Exception

Remarks

A program will not be able to catch this exception if it is thrown. PutTransaction(ITransaction, CancellationToken) will return false, and this exception will be logged using the injected ILogger</a>.

Methods

ThrowIfMismatch(VersionNumber, VersionNumber) Throws a new OptimisticConcurrencyException if actualPreviousVersionNumber is not equal to expectedPreviousVersionNumber.
This post is licensed under CC BY 4.0 by the author.