DbExecutionStrategy.Execute Method
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | Execute(Action) | Repetitively executes the specified operation while it satisfies the current retry policy. |
![]() | Execute<TResult>(Func<TResult>) | Repetitively executes the specified operation while it satisfies the current retry policy. |
DbExecutionStrategy.Execute Method (Action)
Repetitively executes the specified operation while it satisfies the current retry policy.
Parameters
- operation
-
Type:
System.Action
A delegate representing an executable operation that doesn't return any results.
Implements
IDbExecutionStrategy.Execute(Action)Exception | Condition |
---|---|
RetryLimitExceededException | If the retry delay strategy determines the operation should not be retried anymore. |
InvalidOperationException | If an existing transaction is detected and the execution strategy does not support it. |
InvalidOperationException | If this instance was already used to execute an operation. |
DbExecutionStrategy.Execute<TResult> Method (Func<TResult>)
Repetitively executes the specified operation while it satisfies the current retry policy.
Parameters
- operation
-
Type:
System.Func<TResult>
A delegate representing an executable operation that returns the result of type TResult.
Type Parameters
- TResult
The type of result expected from the executable operation.
Exception | Condition |
---|---|
RetryLimitExceededException | If the retry delay strategy determines the operation should not be retried anymore. |
InvalidOperationException | If an existing transaction is detected and the execution strategy does not support it. |
InvalidOperationException | If this instance was already used to execute an operation. |