ForeignKeyAttributeConvention Klasa

Definicja

Konwencja, która konfiguruje właściwości klucza obcego skojarzone z właściwością nawigacji na ForeignKeyAttribute podstawie określonych właściwości lub właściwości nawigacji.

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

Uwagi

W przypadku relacji jeden-do-jednego atrybut musi być określony we właściwości nawigacji wskazującej podmiot zabezpieczeń.

Aby uzyskać więcej informacji i przykłady, zobacz Konwencje tworzenia modeli .

Konstruktory

ForeignKeyAttributeConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy ForeignKeyAttributeConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

Metody

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Wywoływana po dodaniu właściwości złożonej do obiektu przypominającego typ.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Wywoływane po dodaniu typu jednostki do modelu.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Wywoływane po sfinalizowaniu modelu.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Wywoływana, gdy model jest finalizowany.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Wywoływane po dodaniu nawigacji do typu jednostki.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Wywoływane po dodaniu właściwości do typu jednostki.

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

Wywoływana po zmianie odwrotnej nawigacji pominięcia.

Dotyczy