Язык

ForeignKeyIndexConvention Класс

Определение

Соглашение, которое создает индексы для свойств внешнего ключа, если они уже не охватываются существующими индексами или ключами.

[System.Runtime.CompilerServices.Nullable(0)]
public class ForeignKeyIndexConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
public class ForeignKeyIndexConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class ForeignKeyIndexConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type ForeignKeyIndexConvention = class
    interface IForeignKeyAddedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
    interface IForeignKeyPropertiesChangedConvention
    interface IForeignKeyUniquenessChangedConvention
    interface IKeyAddedConvention
    interface IKeyRemovedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IIndexAddedConvention
    interface IIndexRemovedConvention
    interface IIndexUniquenessChangedConvention
    interface IModelFinalizingConvention
type ForeignKeyIndexConvention = class
    interface IForeignKeyAddedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
    interface IForeignKeyPropertiesChangedConvention
    interface IForeignKeyUniquenessChangedConvention
    interface IKeyAddedConvention
    interface IKeyRemovedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IIndexAddedConvention
    interface IIndexRemovedConvention
    interface IIndexUniquenessChangedConvention
    interface IModelFinalizedConvention
type ForeignKeyIndexConvention = class
    interface IForeignKeyAddedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
    interface IForeignKeyPropertiesChangedConvention
    interface IForeignKeyUniquenessChangedConvention
    interface IKeyAddedConvention
    interface IKeyRemovedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IIndexAddedConvention
    interface IIndexRemovedConvention
    interface IIndexUniquenessChangedConvention
    interface IModelFinalizingConvention
Public Class ForeignKeyIndexConvention
Implements IEntityTypeBaseTypeChangedConvention, IForeignKeyAddedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention, IForeignKeyUniquenessChangedConvention, IIndexAddedConvention, IIndexRemovedConvention, IIndexUniquenessChangedConvention, IKeyAddedConvention, IKeyRemovedConvention, IModelFinalizingConvention
Public Class ForeignKeyIndexConvention
Implements IEntityTypeBaseTypeChangedConvention, IForeignKeyAddedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention, IForeignKeyUniquenessChangedConvention, IIndexAddedConvention, IIndexRemovedConvention, IIndexUniquenessChangedConvention, IKeyAddedConvention, IKeyRemovedConvention, IModelFinalizedConvention
Наследование
ForeignKeyIndexConvention
Атрибуты
Реализации

Комментарии

Дополнительные сведения и примеры см. в соглашениях о сборке моделей .

Конструкторы

Имя. Описание
ForeignKeyIndexConvention(ProviderConventionSetBuilderDependencies)

Создает новый экземпляр ForeignKeyIndexConvention.

Свойства

Имя. Описание
Dependencies

Зависимости для этой службы.

Методы

Имя. Описание
AreIndexedBy(IReadOnlyList<IConventionProperty>, Boolean, IReadOnlyList<IConventionProperty>, Boolean)

Возвращает значение, указывающее, охватываются ли указанные свойства существующим индексом.

AreIndexedBy(IReadOnlyList<IConventionPropertyBase>, Boolean, IReadOnlyList<IConventionPropertyBase>, Boolean)

Возвращает значение, указывающее, охватываются ли указанные свойства существующим индексом.

CreateIndex(IReadOnlyList<IConventionProperty>, Boolean, IConventionEntityTypeBuilder)

Создает объект IConventionIndex.

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

Вызывается после изменения базового типа сущности.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Вызывается после добавления внешнего ключа в тип сущности.

ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Вызывается после добавления внешнего ключа в тип сущности.

ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

Вызывается после изменения свойств внешнего ключа или ключа субъекта.

ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

Вызывается после изменения свойств внешнего ключа или ключа субъекта.

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Вызывается после удаления внешнего ключа.

ProcessForeignKeyUniquenessChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Вызывается после изменения уникальности внешнего ключа.

ProcessForeignKeyUniquenessChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Вызывается после изменения уникальности внешнего ключа.

ProcessIndexAdded(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Вызывается после добавления индекса в тип сущности.

ProcessIndexRemoved(IConventionEntityTypeBuilder, IConventionIndex, IConventionContext<IConventionIndex>)

Вызывается после удаления индекса.

ProcessIndexUniquenessChanged(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Вызывается после изменения уникальности индекса.

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

Вызывается после изменения уникальности индекса.

ProcessKeyAdded(IConventionKeyBuilder, IConventionContext<IConventionKeyBuilder>)

Вызывается после добавления ключа в тип сущности.

ProcessKeyRemoved(IConventionEntityTypeBuilder, IConventionKey, IConventionContext<IConventionKey>)

Вызывается после удаления ключа из типа сущности.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Вызывается после завершения модели.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Вызывается при завершении модели.

Применяется к