語言

AttributeToTableAnnotationConvention<TAttribute,TAnnotation> 類別

定義

一個通用的 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>

建構函式

名稱 Description
AttributeToTableAnnotationConvention<TAttribute,TAnnotation>(String, Func<Type,IList<TAttribute>,TAnnotation>)

建立一個慣例,會以指定名稱並使用指定的工廠代理建立表格註解。

方法

名稱 Description
Properties()

開始配置適用於模型中所有屬性的輕量級慣例。

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

開始配置一套輕量級慣例,適用於模型中指定類型的所有原始屬性。

(繼承來源 Convention)
Types()

開始配置一套適用於模型中所有映射型態的輕量級慣例。

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

開始配置一套輕量級慣例,適用於模型中所有源自或實作指定型別的映射型別。

(繼承來源 Convention)

適用於