語言

PropertyDiscoveryConvention 類別

定義

這是一種在實體類型中加入屬性的慣例,對應於 CLR 類型上的純量公共屬性。

[System.Runtime.CompilerServices.Nullable(0)]
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IComplexPropertyAddedConvention
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
Public Class PropertyDiscoveryConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
Public Class PropertyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
繼承
PropertyDiscoveryConvention
屬性
實作

備註

更多資訊與範例請參閱 模型建構慣例 。

建構函式

名稱 Description
PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies, Boolean)

建立一個新的 實例。PropertyDiscoveryConvention

PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies)

建立一個新的 實例。PropertyDiscoveryConvention

屬性

名稱 Description
Dependencies

此服務的依賴關係。

UseAttributes

一個表示慣例是否會使用成員身上屬性的值。

方法

名稱 Description
DiscoverPrimitiveProperties(IConventionTypeBaseBuilder, IConventionContext)

發現給定結構類型的性質。

GetMembers(IConventionTypeBase)

回傳該類型中應在發現屬性時考慮的 CLR 成員。

IsCandidatePrimitiveProperty(MemberInfo, IConventionTypeBase, CoreTypeMapping, Type)

回傳一個值,表示該成員是否為原始屬性候選。

IsCandidatePrimitiveProperty(MemberInfo, IConventionTypeBase, CoreTypeMapping)

回傳一個值,表示該成員是否為原始屬性候選。

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

在將複雜屬性加入類型物件後呼叫。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在模型中加入實體類型後呼叫。

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

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

適用於