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>

用于设置选项的操作。

返回

同一生成器实例,以便可以链接多个调用。

适用于