共用方式為


CosmosDbContextOptionsBuilder.WithOption 方法

定義

複製用來儲存設定的擴充功能來設定選項。 這可確保產生器不會修改已在其他位置使用中的選項。

protected virtual Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder WithOption (Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension,Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension> setAction);
abstract member WithOption : Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension, Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension> -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
override this.WithOption : Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension, Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension> -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
Protected Overridable Function WithOption (setAction As Func(Of CosmosOptionsExtension, CosmosOptionsExtension)) As CosmosDbContextOptionsBuilder

參數

setAction
Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension,Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension>

設定選項的動作。

傳回

相同的產生器實例,以便鏈結多個呼叫。

適用於