SqlAzureExecutionStrategy SqlAzureExecutionStrategy 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
SqlAzureExecutionStrategySqlAzureExecutionStrategySqlAzureExecutionStrategy

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() SqlAzureExecutionStrategy() SqlAzureExecutionStrategy()

Creates a new instance of SqlAzureExecutionStrategy.

SqlAzureExecutionStrategy(Int32, TimeSpan) SqlAzureExecutionStrategy(Int32, TimeSpan) SqlAzureExecutionStrategy(Int32, TimeSpan)

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

Methods

Execute(Action) Execute(Action) Execute(Action)

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

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

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

(Inherited from DbExecutionStrategy)
ExecuteAsync(Func<Task>, CancellationToken) ExecuteAsync(Func<Task>, CancellationToken) 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) ExecuteAsync<TResult>(Func<Task<TResult>>, CancellationToken) ExecuteAsync<TResult>(Func<Task<TResult>>, CancellationToken)

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

(Inherited from DbExecutionStrategy)
GetNextDelay(Exception) GetNextDelay(Exception) GetNextDelay(Exception)

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

(Inherited from DbExecutionStrategy)
ShouldRetryOn(Exception) ShouldRetryOn(Exception) ShouldRetryOn(Exception)

Properties

RetriesOnFailure RetriesOnFailure RetriesOnFailure

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

(Inherited from DbExecutionStrategy)

Applies to