Share via


ForeignKeyAttributeConvention Klasse

Definition

Eine Konvention, die die Fremdschlüsseleigenschaften konfiguriert, die einer Navigationseigenschaft zugeordnet sind, basierend auf den ForeignKeyAttribute in den Eigenschaften oder den Navigationseigenschaften angegebenen.

public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
type ForeignKeyAttributeConvention = class
    interface IForeignKeyAddedConvention
    interface IConvention
    interface IModelFinalizedConvention
type ForeignKeyAttributeConvention = class
    interface IForeignKeyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface IModelFinalizingConvention
type ForeignKeyAttributeConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IForeignKeyAddedConvention
    interface INavigationAddedConvention
    interface ISkipNavigationForeignKeyChangedConvention
    interface IModelFinalizingConvention
type ForeignKeyAttributeConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IForeignKeyAddedConvention
    interface INavigationAddedConvention
    interface ISkipNavigationForeignKeyChangedConvention
    interface IPropertyAddedConvention
    interface IComplexPropertyAddedConvention
    interface IModelFinalizingConvention
Public Class ForeignKeyAttributeConvention
Implements IForeignKeyAddedConvention, IModelFinalizedConvention
Public Class ForeignKeyAttributeConvention
Implements IForeignKeyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention
Public Class ForeignKeyAttributeConvention
Implements IEntityTypeAddedConvention, IForeignKeyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention, ISkipNavigationForeignKeyChangedConvention
Public Class ForeignKeyAttributeConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IForeignKeyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, ISkipNavigationForeignKeyChangedConvention
Vererbung
ForeignKeyAttributeConvention
Implementiert

Hinweise

Für 1:1-Beziehungen muss das Attribut in der Navigationseigenschaft angegeben werden, die auf den Prinzipal zeigt.

Weitere Informationen und Beispiele finden Sie unter Modellerstellungskonventionen .

Konstruktoren

ForeignKeyAttributeConvention(ProviderConventionSetBuilderDependencies)

Erstellt eine neue Instanz von ForeignKeyAttributeConvention.

Eigenschaften

Dependencies

Abhängigkeiten für diesen Dienst.

Methoden

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Wird aufgerufen, nachdem eine komplexe Eigenschaft zu einem typähnlichen Objekt hinzugefügt wurde.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Wird aufgerufen, nachdem dem Modell ein Entitätstyp hinzugefügt wurde.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Wird aufgerufen, nachdem dem Entitätstyp ein Fremdschlüssel hinzugefügt wurde.

ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Wird aufgerufen, nachdem dem Entitätstyp ein Fremdschlüssel hinzugefügt wurde.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Wird aufgerufen, nachdem ein Modell fertig gestellt wurde.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Wird aufgerufen, wenn ein Modell fertig gestellt wird.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Wird aufgerufen, nachdem dem Entitätstyp eine Navigation hinzugefügt wurde.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Wird aufgerufen, nachdem dem Entitätstyp eine Eigenschaft hinzugefügt wurde.

ProcessSkipNavigationForeignKeyChanged(IConventionSkipNavigationBuilder, IConventionForeignKey, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Wird aufgerufen, nachdem eine navigationsinverse skip geändert wurde.

Gilt für: