RelationalDbContextOptionsBuilder<TBuilder,TExtension>.ExecutionStrategy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ExecutionStrategy(Func<ExecutionStrategyContext,IExecutionStrategy>)
将上下文配置为使用提供的 IExecutionStrategy。
public virtual TBuilder ExecutionStrategy (Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext,Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> getExecutionStrategy);
abstract member ExecutionStrategy : Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> -> 'Builder
override this.ExecutionStrategy : Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> -> 'Builder
Public Overridable Function ExecutionStrategy (getExecutionStrategy As Func(Of ExecutionStrategyContext, IExecutionStrategy)) As TBuilder
参数
- getExecutionStrategy
- Func<ExecutionStrategyContext,IExecutionStrategy>
返回执行策略的新实例的函数。
返回
TBuilder
适用于
ExecutionStrategy(Func<ExecutionStrategyDependencies,IExecutionStrategy>)
将上下文配置为使用提供的 IExecutionStrategy。
public virtual TBuilder ExecutionStrategy (Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies,Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> getExecutionStrategy);
abstract member ExecutionStrategy : Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> -> 'Builder
override this.ExecutionStrategy : Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> -> 'Builder
Public Overridable Function ExecutionStrategy (getExecutionStrategy As Func(Of ExecutionStrategyDependencies, IExecutionStrategy)) As TBuilder
参数
- getExecutionStrategy
- Func<ExecutionStrategyDependencies,IExecutionStrategy>
返回执行策略的新实例的函数。
返回
TBuilder
注解
有关详细信息 和示例,请参阅连接复原和数据库重试 。