RequiredPropertyAttributeConvention Class

Definition

A convention that configures properties as required if they have the RequiredAttribute applied.

public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>
public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyFieldChangedConvention
type RequiredPropertyAttributeConvention = class
    inherit PropertyAttributeConventionBase<RequiredAttribute>
type RequiredPropertyAttributeConvention = class
    inherit PropertyAttributeConventionBase<RequiredAttribute>
    interface IComplexPropertyAddedConvention
    interface IConvention
    interface IComplexPropertyFieldChangedConvention
Public Class RequiredPropertyAttributeConvention
Inherits PropertyAttributeConventionBase(Of RequiredAttribute)
Public Class RequiredPropertyAttributeConvention
Inherits PropertyAttributeConventionBase(Of RequiredAttribute)
Implements IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention
Inheritance
RequiredPropertyAttributeConvention
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

RequiredPropertyAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of RequiredPropertyAttributeConvention.

Properties

Dependencies

Dependencies for this service.

(Inherited from PropertyAttributeConventionBase<TAttribute>)

Methods

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Called after a complex property is added to an type-like object.

(Inherited from PropertyAttributeConventionBase<TAttribute>)
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Called after the backing field for a complex property is changed.

(Inherited from PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionComplexPropertyBuilder, RequiredAttribute, MemberInfo, IConventionContext)

Called after a complex property is added to a type with an attribute on the associated CLR property or field.

ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Called after a complex property is added to a type with an attribute on the associated CLR property or field.

(Inherited from PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Called after a property is added to the entity type.

(Inherited from PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, RequiredAttribute, MemberInfo, IConventionContext)

Called after a property is added to the entity type with an attribute on the associated CLR property or field.

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Called after a property is added to the entity type with an attribute on the associated CLR property or field.

(Inherited from PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Called after the backing field for a property is changed.

(Inherited from PropertyAttributeConventionBase<TAttribute>)

Applies to