TypeAttributeConventionBase<TAttribute> 类

定义

基于结构类型上指定的属性执行配置的约定的基类型。

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

类型参数

TAttribute

要查找的属性类型。

继承
TypeAttributeConventionBase<TAttribute>
派生
实现

注解

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

构造函数

TypeAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies)

创建 TypeAttributeConventionBase<TAttribute> 的新实例。

属性

Dependencies

此服务的依赖项。

方法

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

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

ProcessComplexTypeAdded(IConventionComplexTypeBuilder, TAttribute, IConventionContext)

如果复杂类型具有 属性,则将其添加到模型后调用。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在实体类型添加到模型后调用。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

如果实体类型具有属性,则将其添加到模型后调用。

ReplaceWithEntityType(IConventionComplexTypeBuilder, Nullable<Boolean>)

尝试将复杂类型替换为实体类型。

适用于