Table of Contents

Class RelationalExecutionStrategyFactory

Namespace
Microsoft.EntityFrameworkCore.Storage
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Factory for creating Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy instances for use with relational database providers.

public class RelationalExecutionStrategyFactory : IExecutionStrategyFactory
Inheritance
RelationalExecutionStrategyFactory
Implements
IExecutionStrategyFactory
Inherited Members

Remarks

The service lifetime is Scoped. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Implementation of database providers and extensions for more information and examples.

Constructors

RelationalExecutionStrategyFactory(ExecutionStrategyDependencies)

Creates a new instance of this class with the given service dependencies.

public RelationalExecutionStrategyFactory(ExecutionStrategyDependencies dependencies)

Parameters

dependencies ExecutionStrategyDependencies

Parameter object containing dependencies for this service.

Properties

Dependencies

Dependencies for this service.

protected virtual ExecutionStrategyDependencies Dependencies { get; }

Property Value

ExecutionStrategyDependencies

Methods

Create()

Creates an Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy for the current database provider.

public virtual IExecutionStrategy Create()

Returns

IExecutionStrategy

CreateDefaultStrategy(ExecutionStrategyDependencies)

Creates or returns a cached instance of the default Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy for the current database provider.

protected virtual IExecutionStrategy CreateDefaultStrategy(ExecutionStrategyDependencies dependencies)

Parameters

dependencies ExecutionStrategyDependencies

Returns

IExecutionStrategy