共用方式為


AttributeToColumnAnnotationConvention<TAttribute,TAnnotation> 類別

定義

Code First 慣例的一般用途類別,可從 .NET 屬性讀取屬性,並根據這些屬性產生資料行批註。

public class AttributeToColumnAnnotationConvention<TAttribute,TAnnotation> : System.Data.Entity.ModelConfiguration.Conventions.Convention where TAttribute : Attribute
type AttributeToColumnAnnotationConvention<'Attribute, 'Annotation (requires 'Attribute :> Attribute)> = class
    inherit Convention
Public Class AttributeToColumnAnnotationConvention(Of TAttribute, TAnnotation)
Inherits Convention

類型參數

TAttribute

要探索的屬性類型。

TAnnotation

將建立的批註類型。

繼承
AttributeToColumnAnnotationConvention<TAttribute,TAnnotation>
衍生

建構函式

AttributeToColumnAnnotationConvention<TAttribute,TAnnotation>(String, Func<PropertyInfo,IList<TAttribute>,TAnnotation>)

建構慣例,這個慣例會建立具有指定名稱的資料行批註,以及使用指定的處理站委派。

方法

Properties()

開始設定適用于模型中所有屬性的輕量型慣例。

(繼承來源 Convention)
Properties<T>()

開始設定輕量型慣例,此慣例會套用至模型中指定類型的所有基本屬性。

(繼承來源 Convention)
Types()

開始設定適用于模型中所有對應類型的輕量型慣例。

(繼承來源 Convention)
Types<T>()

開始設定輕量型慣例,此慣例會套用至衍生自或實作指定型別之模型中的所有對應型別。

(繼承來源 Convention)

適用於