IndexBuilder IndexBuilder Class

Provides a simple API for configuring an Index.

Instances of this class are returned from methods when using the ModelBuilder API and it is not designed to be directly constructed in your application code.

Syntax

Declaration

public class IndexBuilder : IInfrastructure<IMutableModel>, IInfrastructure<InternalIndexBuilder>Public Class IndexBuilder
    Implements IInfrastructure(Of IMutableModel), IInfrastructure(Of InternalIndexBuilder)

Inheritance Hierarchy

  • System.Object
    System.Object
  • IndexBuilder
    IndexBuilder

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Properties summary

The index being configured.

Methods summary

Adds or updates an annotation on the index. If an annotation with the key specified in annotation already exists it's value will be updated.

Configures whether this index is unique (i.e. the value(s) for each instance must be unique).

Explicit Interface Implementations summary

The model that the index belongs to.

The internal builder being used to configure the index.

Constructors

  • IndexBuilder(InternalIndexBuilder)
    IndexBuilder(InternalIndexBuilder)

    This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    public IndexBuilder(InternalIndexBuilder builder)Public Sub New(builder As InternalIndexBuilder)

    Parameters

Properties

  • Metadata
    Metadata

    The index being configured.

    public virtual IMutableIndex Metadata { get; }Public Overridable ReadOnly Property Metadata As IMutableIndex

    Property Value

Methods

  • HasAnnotation(String, Object)
    HasAnnotation(String, Object)

    Adds or updates an annotation on the index. If an annotation with the key specified in annotation already exists it's value will be updated.

    public virtual IndexBuilder HasAnnotation(string annotation, object value)Public Overridable Function HasAnnotation(annotation As String, value As Object) As IndexBuilder

    Parameters

    • annotation
      System.String
      System.String

      The key of the annotation to be added or updated.

    • value
      System.Object
      System.Object

      The value to be stored in the annotation.

    Returns

  • IsUnique(Boolean)
    IsUnique(Boolean)

    Configures whether this index is unique (i.e. the value(s) for each instance must be unique).

    public virtual IndexBuilder IsUnique(bool unique = true)Public Overridable Function IsUnique(unique As Boolean = True) As IndexBuilder

    Parameters

    • unique
      System.Boolean
      System.Boolean

      A value indicating whether this index is unique.

    Returns

Explicit Interface Implementations

  • IInfrastructure<IMutableModel>.Instance
    Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.IMutableModel>.Instance

    The model that the index belongs to.

    IMutableModel IInfrastructure<IMutableModel>.Instance { get; }ReadOnly WriteOnly Property Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.IMutableModel>.Instance As IMutableModel Implements IInfrastructure(Of IMutableModel).Instance

    Returns

  • IInfrastructure<InternalIndexBuilder>.Instance
    Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalIndexBuilder>.Instance

    The internal builder being used to configure the index.

    InternalIndexBuilder IInfrastructure<InternalIndexBuilder>.Instance { get; }ReadOnly WriteOnly Property Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalIndexBuilder>.Instance As InternalIndexBuilder Implements IInfrastructure(Of InternalIndexBuilder).Instance

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.dll