CosmosDbContextOptionsBuilder.ExecutionStrategy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将上下文配置为使用提供的 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 。