Share via


PropertyAttributeConventionBase<TAttribute> Class

Definition

A base type for conventions that perform configuration based on an attribute applied to a property.

public abstract class PropertyAttributeConventionBase<TAttribute> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention where TAttribute : Attribute
type PropertyAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
    interface IPropertyAddedConvention
    interface IConvention
    interface IPropertyFieldChangedConvention
Public MustInherit Class PropertyAttributeConventionBase(Of TAttribute)
Implements IPropertyAddedConvention, IPropertyFieldChangedConvention

Type Parameters

TAttribute

The attribute type to look for.

Inheritance
PropertyAttributeConventionBase<TAttribute>
Derived
Implements

Remarks

The deriving class must implement IPropertyAddedConvention and IPropertyFieldChangedConvention to also handle complex properties.

See Model building conventions for more information and examples.

Constructors

PropertyAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies)

Creates a new instance of PropertyAttributeConventionBase<TAttribute>.

Properties

Dependencies

Dependencies for this service.

Methods

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

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

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

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

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.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Called after a property is added to the entity type.

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.

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

Called after the backing field for a property is changed.

Applies to