SqlAzureExecutionStrategy Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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 |
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
Entity Framework