语言

CosmosAutomaticIndexingBuilder 类

定义

一个 Fluent Builder,用于配置 Cosmos 容器的自动索引策略。 返回者HasAutomaticIndexingEntityTypeBuilder;每次调用以Except(String)将路径添加到容器的路径ExcludedPaths。

[System.Runtime.CompilerServices.Nullable(0)]
public class CosmosAutomaticIndexingBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder>
[<System.Runtime.CompilerServices.Nullable(0)>]
type CosmosAutomaticIndexingBuilder = class
    interface IInfrastructure<IConventionEntityTypeBuilder>
Public Class CosmosAutomaticIndexingBuilder
Implements IInfrastructure(Of IConventionEntityTypeBuilder)
继承
CosmosAutomaticIndexingBuilder
派生
特性
实现

注解

有关详细信息,请参阅Azure Cosmos DB中的索引策略。

构造函数

名称 说明
CosmosAutomaticIndexingBuilder(EntityTypeBuilder)

创建新的 CosmosAutomaticIndexingBuilder。 通常通过而不是 HasAutomaticIndexing(EntityTypeBuilder, Boolean) 直接构造获得。

属性

名称 说明
EntityTypeBuilder

用于支持此自动索引配置的实体类型生成器。

方法

名称 说明
Except(String)

向容器 ExcludedPaths添加路径。 路径必须使用 Cosmos 索引策略语法(例如 /secret/? ,对于叶, /items/[]/* 对于数组子树)。 如果通过 HasAutomaticIndexing(false) 禁用自动索引,则引发

显式接口实现

名称 说明
IInfrastructure<IConventionEntityTypeBuilder>.Instance

获取隐藏的属性的值。

扩展方法

名称 说明
GetInfrastructure<T>(IInfrastructure<T>)

从正在使用的隐藏 IInfrastructure<T>属性中获取值。

此方法通常由数据库提供程序(和其他扩展)使用。 它通常不用于应用程序代码。

适用于