ForeignKeyAttributeConvention Clase

Definición

Convención que configura las propiedades de clave externa asociadas a una propiedad de navegación según el ForeignKeyAttribute especificado en las propiedades o las propiedades de navegación.

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
Herencia
ForeignKeyAttributeConvention
Implementaciones

Comentarios

Para las relaciones uno a uno, el atributo debe especificarse en la propiedad de navegación que apunta a la entidad de seguridad.

Consulte Convenciones de creación de modelos para obtener más información y ejemplos.

Constructores

ForeignKeyAttributeConvention(ProviderConventionSetBuilderDependencies)

Crea una nueva instancia de ForeignKeyAttributeConvention.

Propiedades

Dependencies

Dependencias de este servicio.

Métodos

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Se llama después de agregar una propiedad compleja a un objeto similar a un tipo.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Se llama después de agregar un tipo de entidad al modelo.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Se llama después de agregar una clave externa al tipo de entidad.

ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Se llama después de agregar una clave externa al tipo de entidad.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Se llama después de finalizar un modelo.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Se llama cuando se finaliza un modelo.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Se llama después de agregar una navegación al tipo de entidad.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Se llama después de agregar una propiedad al tipo de entidad.

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

Se le llama después de cambiar un inverso de navegación de omisión.

Se aplica a