Share via


SqlAzureExecutionStrategy Class

Definition

An IDbExecutionStrategy that retries actions that throw exceptions caused by SQL Azure transient failures.

public class SqlAzureExecutionStrategy : System.Data.Entity.Infrastructure.DbExecutionStrategy
type SqlAzureExecutionStrategy = class
    inherit DbExecutionStrategy
Public Class SqlAzureExecutionStrategy
Inherits DbExecutionStrategy
Inheritance
SqlAzureExecutionStrategy

Remarks

This execution strategy will retry the operation on TimeoutException and SqlException if the Errors contains any of the following error numbers: 40613, 40501, 40197, 10929, 10928, 10060, 10054, 10053, 233, 64 and 20

Constructors

SqlAzureExecutionStrategy()

Creates a new instance of SqlAzureExecutionStrategy.

SqlAzureExecutionStrategy(Int32, TimeSpan)

Creates a new instance of SqlAzureExecutionStrategy with the specified limits for number of retries and the delay between retries.

Properties

RetriesOnFailure

Returns true to indicate that DbExecutionStrategy might retry the execution after a failure.

(Inherited from DbExecutionStrategy)

Methods

Execute(Action)

Repetitively executes the specified operation while it satisfies the current retry policy.

(Inherited from DbExecutionStrategy)
Execute<TResult>(Func<TResult>)

Repetitively executes the specified operation while it satisfies the current retry policy.

(Inherited from DbExecutionStrategy)
ExecuteAsync(Func<Task>, CancellationToken)

Repetitively executes the specified asynchronous operation while it satisfies the current retry policy.

(Inherited from DbExecutionStrategy)
ExecuteAsync<TResult>(Func<Task<TResult>>, CancellationToken)

Repeatedly executes the specified asynchronous operation while it satisfies the current retry policy.

(Inherited from DbExecutionStrategy)
GetNextDelay(Exception)

Determines whether the operation should be retried and the delay before the next attempt.

(Inherited from DbExecutionStrategy)
ShouldRetryOn(Exception)

Determines whether the specified exception represents a transient failure that can be compensated by a retry.

Applies to