SqlServerIndexConvention Klasa

Definicja

Konwencja, która konfiguruje filtr unikatowych indeksów nieklasterowanych z kolumnami dopuszczanymi do wartości null w celu filtrowania wartości null.

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
Dziedziczenie
SqlServerIndexConvention
Implementuje

Uwagi

Aby uzyskać więcej informacji i przykłady, zobacz Konwencje tworzenia modeli oraz Uzyskiwanie dostępu do SQL Server i Azure SQL baz danych za pomocą programu EF Core.

Konstruktory

Nazwa Opis
SqlServerIndexConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies, ISqlGenerationHelper)

Tworzy nowe wystąpienie klasy SqlServerIndexConvention.

Właściwości

Nazwa Opis
Dependencies

Zależności dla tej usługi.

RelationalDependencies

Zależności specyficzne dla dostawcy relacyjnego dla tej usługi.

Metody

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

Wywoływane po zmianie typu podstawowego typu jednostki.

ProcessIndexAdded(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Wywoływane po dodaniu indeksu do typu jednostki.

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

Wywoływane po zmianie adnotacji w indeksie.

ProcessIndexUniquenessChanged(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Wywoływana po zmianie unikatowości indeksu.

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

Wywoływana po zmianie unikatowości indeksu.

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

Wywoływane po zmianie adnotacji we właściwości.

ProcessPropertyNullabilityChanged(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Wywoływana po zmianie wartości null dla właściwości.

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

Wywoływana po zmianie wartości null dla właściwości.

Dotyczy