语言

PropertyAttributeConventionBase<TAttribute> 类

定义

基于应用于属性的属性执行配置的约定的基类型。

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

类型参数

TAttribute

要查找的属性类型。

继承
PropertyAttributeConventionBase<TAttribute>
派生
特性
实现

注解

派生类必须实现 IPropertyAddedConvention 并 IPropertyFieldChangedConvention 处理复杂属性。

有关详细信息和示例,请参阅 模型生成约定 。

构造函数

名称 说明
PropertyAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies)

创建 PropertyAttributeConventionBase<TAttribute>的新实例。

属性

名称 说明
Dependencies

此服务的依赖项。

方法

名称 说明
ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

在将复杂属性添加到类似类型的对象后调用。

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

在复杂属性的后盾字段更改后调用。

ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

在将复杂属性添加到具有关联 CLR 属性或字段的属性的类型后调用。

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

在将属性添加到实体类型后调用。

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

在将属性添加到实体类型后调用,该实体类型具有关联的 CLR 属性或字段上的属性。

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

在属性的后盾字段更改后调用。

适用于