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>)

嘗試以實體類型取代複雜類型。

適用於