OwnedAttributeConvention 類別

定義

設定實體型別做 OwnedAttribute 為擁有的慣例。

public class OwnedAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.TypeAttributeConventionBase<Microsoft.EntityFrameworkCore.OwnedAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention
type OwnedAttributeConvention = class
    inherit TypeAttributeConventionBase<OwnedAttribute>
    interface IComplexPropertyAddedConvention
    interface IConvention
Public Class OwnedAttributeConvention
Inherits TypeAttributeConventionBase(Of OwnedAttribute)
Implements IComplexPropertyAddedConvention
繼承
實作

備註

如需詳細資訊和範例,請參閱 模型建置慣例

建構函式

OwnedAttributeConvention(ProviderConventionSetBuilderDependencies)

建立 OwnedAttributeConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

(繼承來源 TypeAttributeConventionBase<TAttribute>)

方法

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

在將複雜屬性新增至類似類型的 物件之後呼叫。

(繼承來源 TypeAttributeConventionBase<TAttribute>)
ProcessComplexTypeAdded(IConventionComplexTypeBuilder, OwnedAttribute, IConventionContext)

設定實體型別做 OwnedAttribute 為擁有的慣例。

ProcessComplexTypeAdded(IConventionComplexTypeBuilder, TAttribute, IConventionContext)

如果模型具有 屬性,則會在複雜型別加入模型之後呼叫。

(繼承來源 TypeAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在實體類型新增至模型之後呼叫。

(繼承來源 TypeAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, OwnedAttribute, IConventionContext<IConventionEntityTypeBuilder>)

設定實體型別做 OwnedAttribute 為擁有的慣例。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

如果實體類型具有屬性,請在模型新增實體類型之後呼叫。

(繼承來源 TypeAttributeConventionBase<TAttribute>)
ReplaceWithEntityType(IConventionComplexTypeBuilder, Nullable<Boolean>)

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

(繼承來源 TypeAttributeConventionBase<TAttribute>)

適用於