共用方式為


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

適用於