# Class NpgsqlExecutionStrategy

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public class NpgsqlExecutionStrategy : IExecutionStrategy

Inheritance
  object
  NpgsqlExecutionStrategy

Implements
  IExecutionStrategy

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlExecutionStrategy(ExecutionStrategyDependencies)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public NpgsqlExecutionStrategy(ExecutionStrategyDependencies dependencies)

#### Parameters

`dependencies` ExecutionStrategyDependencies

## Properties

### RetriesOnFailure

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public virtual bool RetriesOnFailure { get; }

#### Property Value

bool

## Methods

### ExecuteAsync<TState, TResult>(TState, Func<DbContext, TState, CancellationToken, Task<TResult>>, Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>>?, CancellationToken)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public virtual Task<TResult> ExecuteAsync<TState, TResult>(TState state, Func<DbContext, TState, CancellationToken, Task<TResult>> operation, Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>>? verifySucceeded, CancellationToken cancellationToken)

#### Parameters

`state` TState
`operation` Func<DbContext, TState, CancellationToken, Task<TResult>>
`verifySucceeded` Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>>
`cancellationToken` CancellationToken

#### Returns

Task<TResult>

#### Type Parameters

`TState`
`TResult`

### Execute<TState, TResult>(TState, Func<DbContext, TState, TResult>, Func<DbContext, TState, ExecutionResult<TResult>>?)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public virtual TResult Execute<TState, TResult>(TState state, Func<DbContext, TState, TResult> operation, Func<DbContext, TState, ExecutionResult<TResult>>? verifySucceeded)

#### Parameters

`state` TState
`operation` Func<DbContext, TState, TResult>
`verifySucceeded` Func<DbContext, TState, ExecutionResult<TResult>>

#### Returns

TResult

#### Type Parameters

`TState`
`TResult`