Lenguaje

RequiredPropertyAttributeConvention Clase

Definición

Convención que configura las propiedades según sea necesario si se han RequiredAttribute aplicado.

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })]
public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyFieldChangedConvention
public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>]
type RequiredPropertyAttributeConvention = class
    inherit PropertyAttributeConventionBase<RequiredAttribute>
    interface IComplexPropertyAddedConvention
    interface IConvention
    interface IComplexPropertyFieldChangedConvention
type RequiredPropertyAttributeConvention = class
    inherit PropertyAttributeConventionBase<RequiredAttribute>
Public Class RequiredPropertyAttributeConvention
Inherits PropertyAttributeConventionBase(Of RequiredAttribute)
Implements IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention
Public Class RequiredPropertyAttributeConvention
Inherits PropertyAttributeConventionBase(Of RequiredAttribute)
Herencia
RequiredPropertyAttributeConvention
Atributos
Implementaciones

Comentarios

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

Constructores

Nombre Description
RequiredPropertyAttributeConvention(ProviderConventionSetBuilderDependencies)

Crea una nueva instancia de RequiredPropertyAttributeConvention.

Propiedades

Nombre Description
Dependencies

Dependencias de este servicio.

(Heredado de PropertyAttributeConventionBase<TAttribute>)

Métodos

Nombre Description
ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

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

(Heredado de PropertyAttributeConventionBase<TAttribute>)
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

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

(Heredado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionComplexPropertyBuilder, RequiredAttribute, 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(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.

(Heredado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

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

(Heredado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, RequiredAttribute, MemberInfo, IConventionContext)

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

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.

(Heredado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

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

(Heredado de PropertyAttributeConventionBase<TAttribute>)

Se aplica a