Jazyk

ForeignKeyIndexConvention Třída

Definice

Konvence, která vytváří indexy pro vlastnosti cizího klíče, pokud nejsou již pokryty existujícími indexy nebo klíči.

[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
Dědičnost
ForeignKeyIndexConvention
Atributy
Implementuje

Poznámky

Další informace a příklady najdete v tématu Konvence vytváření modelů .

Konstruktory

Název Description
ForeignKeyIndexConvention(ProviderConventionSetBuilderDependencies)

Vytvoří novou instanci .ForeignKeyIndexConvention

Vlastnosti

Název Description
Dependencies

Závislosti pro tuto službu.

Metody

Název Description
AreIndexedBy(IReadOnlyList<IConventionProperty>, Boolean, IReadOnlyList<IConventionProperty>, Boolean)

Vrátí hodnotu určující, zda jsou dané vlastnosti již pokryty existujícím indexem.

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

Vrátí hodnotu určující, zda jsou dané vlastnosti již pokryty existujícím indexem.

CreateIndex(IReadOnlyList<IConventionProperty>, Boolean, IConventionEntityTypeBuilder)

Vytvoří IConventionIndex.

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

Volá se po změně základního typu typu entity.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Volá se po přidání cizího klíče do typu entity.

ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Volá se po přidání cizího klíče do typu entity.

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

Volá se po změně vlastností cizího klíče nebo instančního klíče.

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

Volá se po změně vlastností cizího klíče nebo instančního klíče.

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Volá se po odebrání cizího klíče.

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

Volá se po změně jedinečnosti cizího klíče.

ProcessForeignKeyUniquenessChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Volá se po změně jedinečnosti cizího klíče.

ProcessIndexAdded(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Volá se po přidání indexu do typu entity.

ProcessIndexRemoved(IConventionEntityTypeBuilder, IConventionIndex, IConventionContext<IConventionIndex>)

Volá se po odebrání indexu.

ProcessIndexUniquenessChanged(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

Volá se po změně jedinečnosti indexu.

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

Volá se po změně jedinečnosti indexu.

ProcessKeyAdded(IConventionKeyBuilder, IConventionContext<IConventionKeyBuilder>)

Volá se po přidání klíče do typu entity.

ProcessKeyRemoved(IConventionEntityTypeBuilder, IConventionKey, IConventionContext<IConventionKey>)

Volá se po odebrání klíče z typu entity.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Volá se po dokončení modelu.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Volá se při finalizaci modelu.

Platí pro