PropertyDiscoveryConvention 類別

定義

慣例,會將屬性新增至對應至 CLR 型別上純量公用屬性的實體類型。

public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IComplexPropertyAddedConvention
Public Class PropertyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
Public Class PropertyDiscoveryConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
繼承
PropertyDiscoveryConvention
實作

備註

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

建構函式

PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies)

建立 PropertyDiscoveryConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

方法

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

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

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

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

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

在實體類型的基底類型變更之後呼叫。

適用於