PropertyAttributeConventionBase<TAttribute> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
根據套用至屬性的屬性來執行組態的慣例基底類型。
public abstract class PropertyAttributeConventionBase<TAttribute> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention where TAttribute : Attribute
type PropertyAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
interface IPropertyAddedConvention
interface IConvention
interface IPropertyFieldChangedConvention
Public MustInherit Class PropertyAttributeConventionBase(Of TAttribute)
Implements IPropertyAddedConvention, IPropertyFieldChangedConvention
類型參數
- TAttribute
要尋找的屬性類型。
- 繼承
-
PropertyAttributeConventionBase<TAttribute>
- 衍生
- 實作
備註
衍生類別必須實 IPropertyAddedConvention 作 和 IPropertyFieldChangedConvention ,才能處理複雜的屬性。
如需詳細資訊和範例,請參閱 模型建置慣例 。
建構函式
| 名稱 | Description |
|---|---|
| PropertyAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies) |
建立 PropertyAttributeConventionBase<TAttribute> 的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| Dependencies |
此服務的相依性。 |
方法
| 名稱 | Description |
|---|---|
| ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>) |
在將複雜屬性新增至類似類型的物件之後呼叫。 |
| ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>) |
在複雜屬性的備份欄位變更之後呼叫。 |
| ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext) |
在將複雜屬性新增至具有相關聯 CLR 屬性或欄位之屬性的類型之後呼叫。 |
| ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>) |
在屬性新增至實體類型之後呼叫。 |
| ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext) |
在屬性加入至實體類型之後呼叫,該實體類型具有相關聯 CLR 屬性或欄位上的屬性。 |
| ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>) |
在屬性的支援欄位變更之後呼叫。 |