語言

ServicePropertyDiscoveryConvention 類別

定義

一個為實體類型添加服務屬性的慣例。

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

備註

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

建構函式

名稱 Description
ServicePropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies, Boolean)

建立一個新的 實例。ServicePropertyDiscoveryConvention

ServicePropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies)

建立一個新的 實例。ServicePropertyDiscoveryConvention

屬性

名稱 Description
Dependencies

此服務的依賴關係。

UseAttributes

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

方法

名稱 Description
DiscoverServiceProperties(IConventionTypeBaseBuilder, IConventionContext)

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

GetMembers(IConventionTypeBase)

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

IsCandidateServiceProperty(MemberInfo, IConventionTypeBase, IParameterBindingFactory)

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

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

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

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

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

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

在忽略某個實體類型的成員後被呼叫。

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

模型最終定案後才會被通知。

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

當模型正在定案時會被召喚。

適用於