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>) |
构造一个约定,该约定将使用给定的名称和使用给定的工厂委托创建表批注。 |
方法
| 名称 | 说明 |
|---|---|
| Properties() |
开始配置适用于模型中所有属性的轻型约定。 (继承自 Convention) |
| Properties<T>() |
开始配置适用于模型中指定类型的所有基元属性的轻型约定。 (继承自 Convention) |
| Types() |
开始配置适用于模型中所有映射类型的轻型约定。 (继承自 Convention) |
| Types<T>() |
开始配置轻型约定,该约定适用于派生自或实现指定类型的模型中的所有映射类型。 (继承自 Convention) |