PropertyAttributeConfigurationConvention<TAttribute> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
處理在模型中類型屬性上找到 CLR 屬性的慣例基類。
public abstract class PropertyAttributeConfigurationConvention<TAttribute> : System.Data.Entity.ModelConfiguration.Conventions.Convention where TAttribute : Attribute
type PropertyAttributeConfigurationConvention<'Attribute (requires 'Attribute :> Attribute)> = class
inherit Convention
Public MustInherit Class PropertyAttributeConfigurationConvention(Of TAttribute)
Inherits Convention
類型參數
- TAttribute
要尋找的屬性類型。
- 繼承
- 衍生
備註
請注意,即使模型中未包含衍生慣例,也會套用至對應類型上具有指定屬性的任何非靜態屬性。
建構函式
PropertyAttributeConfigurationConvention<TAttribute>() |
初始化 PropertyAttributeConfigurationConvention<TAttribute> 類別的新執行個體。 |
方法
Apply(PropertyInfo, ConventionTypeConfiguration, TAttribute) |
將此慣例套用至已套用 TAttribute 類型的屬性的屬性。 |
Properties() |
開始設定套用至模型中所有屬性的輕量型慣例。 (繼承來源 Convention) |
Properties<T>() |
開始設定輕量型慣例,以套用至模型中指定型別的所有基本屬性。 (繼承來源 Convention) |
Types() |
開始設定適用于模型中所有對應類型的輕量型慣例。 (繼承來源 Convention) |
Types<T>() |
開始設定輕量型慣例,此慣例會套用至衍生自或實作指定型別之模型中的所有對應型別。 (繼承來源 Convention) |