DbExecutionStrategy.Execute Method

Definition

Overloads

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.

Execute(Action)

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

public void Execute (Action operation);
abstract member Execute : Action -> unit
override this.Execute : Action -> unit
Public Sub Execute (operation As Action)

Parameters

operation
Action

A delegate representing an executable operation that doesn't return any results.

Implements

Exceptions

if the retry delay strategy determines the operation shouldn't be retried anymore

if this instance was already used to execute an operation

Applies to

Execute<TResult>(Func<TResult>)

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

public TResult Execute<TResult> (Func<TResult> operation);
abstract member Execute : Func<'Result> -> 'Result
override this.Execute : Func<'Result> -> 'Result
Public Function Execute(Of TResult) (operation As Func(Of TResult)) As TResult

Type Parameters

TResult

The type of result expected from the executable operation.

Parameters

operation
Func<TResult>

A delegate representing an executable operation that returns the result of type TResult.

Returns

TResult

The result from the operation.

Implements

Exceptions

if the retry delay strategy determines the operation shouldn't be retried anymore

if this instance was already used to execute an operation

Applies to