AttributeToTableAnnotationConvention<TAttribute,TAnnotation> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
Code First 慣例的一般用途類別,可從 .NET 類型讀取屬性,並根據這些屬性產生資料表批註。
public class AttributeToTableAnnotationConvention<TAttribute,TAnnotation> : System.Data.Entity.ModelConfiguration.Conventions.Convention where TAttribute : Attribute
type AttributeToTableAnnotationConvention<'Attribute, 'Annotation (requires 'Attribute :> Attribute)> = class
inherit Convention
Public Class AttributeToTableAnnotationConvention(Of TAttribute, TAnnotation)
Inherits Convention
類型參數
- TAttribute
要探索的屬性類型。
- TAnnotation
將建立的批註類型。
- 繼承
建構函式
AttributeToTableAnnotationConvention<TAttribute,TAnnotation>(String, Func<Type,IList<TAttribute>,TAnnotation>) |
建構慣例,此慣例會建立具有指定名稱的資料表批註,以及使用指定的 Factory 委派。 |
方法
Properties() |
開始設定套用至模型中所有屬性的輕量型慣例。 (繼承來源 Convention) |
Properties<T>() |
開始設定輕量型慣例,以套用至模型中指定型別的所有基本屬性。 (繼承來源 Convention) |
Types() |
開始設定適用于模型中所有對應類型的輕量型慣例。 (繼承來源 Convention) |
Types<T>() |
開始設定輕量型慣例,此慣例會套用至衍生自或實作指定型別之模型中的所有對應型別。 (繼承來源 Convention) |