语言

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>

构造函数

名称 说明
AttributeToTableAnnotationConvention<TAttribute,TAnnotation>(String, Func<Type,IList<TAttribute>,TAnnotation>)

构造一个约定,该约定将使用给定的名称和使用给定的工厂委托创建表批注。

方法

名称 说明
Properties()

开始配置适用于模型中所有属性的轻型约定。

(继承自 Convention)
Properties<T>()

开始配置适用于模型中指定类型的所有基元属性的轻型约定。

(继承自 Convention)
Types()

开始配置适用于模型中所有映射类型的轻型约定。

(继承自 Convention)
Types<T>()

开始配置轻型约定,该约定适用于派生自或实现指定类型的模型中的所有映射类型。

(继承自 Convention)

适用于