Share via


SqlServerIndexConvention Class

Definition

A convention that configures the filter for unique non-clustered indexes with nullable columns to filter out null values.

public class SqlServerIndexConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyNullabilityChangedConvention
type SqlServerIndexConvention = class
    interface IEntityTypeBaseTypeChangedConvention
    interface IConvention
    interface IIndexAddedConvention
    interface IIndexUniquenessChangedConvention
    interface IIndexAnnotationChangedConvention
    interface IPropertyNullabilityChangedConvention
    interface IPropertyAnnotationChangedConvention
Public Class SqlServerIndexConvention
Implements IEntityTypeBaseTypeChangedConvention, IIndexAddedConvention, IIndexAnnotationChangedConvention, IIndexUniquenessChangedConvention, IPropertyAnnotationChangedConvention, IPropertyNullabilityChangedConvention
Inheritance
SqlServerIndexConvention
Implements

Remarks

See Model building conventions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Constructors

SqlServerIndexConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies, ISqlGenerationHelper)

Creates a new instance of SqlServerIndexConvention.

Properties

Dependencies

Dependencies for this service.

RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after the base type of an entity type changes.

ProcessIndexAdded(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Called after an index is added to the entity type.

ProcessIndexAnnotationChanged(IConventionIndexBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on an index.

ProcessIndexUniquenessChanged(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Called after the uniqueness for an index is changed.

ProcessIndexUniquenessChanged(IConventionIndexBuilder, IConventionContext<Nullable<Boolean>>)

Called after the uniqueness for an index is changed.

ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on a property.

ProcessPropertyNullabilityChanged(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Called after the nullability for a property is changed.

ProcessPropertyNullabilityChanged(IConventionPropertyBuilder, IConventionContext<Nullable<Boolean>>)

Called after the nullability for a property is changed.

Applies to