PropertyAttributeConventionBase<TAttribute> Clase

Definición

Tipo base para convenciones que realizan la configuración en función de un atributo aplicado a una propiedad.

C#
public abstract class PropertyAttributeConventionBase<TAttribute> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention where TAttribute : Attribute

Parámetros de tipo

TAttribute

Tipo de atributo que se va a buscar.

Herencia
PropertyAttributeConventionBase<TAttribute>
Derivado
Implementaciones

Comentarios

La clase de derivación debe implementar IPropertyAddedConvention y IPropertyFieldChangedConvention para controlar también propiedades complejas.

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

Constructores

Propiedades

Dependencies

Dependencias para este servicio.

Métodos

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

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

ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Se llama después de cambiar el campo de respaldo de una propiedad compleja.

ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Se llama después de agregar una propiedad compleja a un tipo con un atributo en la propiedad o campo CLR asociado.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

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

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Se llama después de agregar una propiedad al tipo de entidad con un atributo en la propiedad o campo CLR asociado.

ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Se llama después de cambiar el campo de respaldo de una propiedad.

Se aplica a

Producto Versiones
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0