CosmosDbContextOptionsBuilder.ExecutionStrategy 方法

定义

将上下文配置为使用提供的 IExecutionStrategy

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder ExecutionStrategy (Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies,Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> getExecutionStrategy);
abstract member ExecutionStrategy : Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
override this.ExecutionStrategy : Func<Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy> -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
Public Overridable Function ExecutionStrategy (getExecutionStrategy As Func(Of ExecutionStrategyDependencies, IExecutionStrategy)) As CosmosDbContextOptionsBuilder

参数

getExecutionStrategy
Func<ExecutionStrategyDependencies,IExecutionStrategy>

返回执行策略的新实例的函数。

返回

注解

有关详细信息和示例,请参阅 使用 DbContextOptions使用 EF Core 访问 Azure Cosmos DB

适用于