AttributeToColumnAnnotationConvention<TAttribute,TAnnotation> 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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>(String, Func<PropertyInfo,IList<TAttribute>,TAnnotation>) |
构造一个约定,该约定将创建具有给定名称和使用给定工厂委托的列批注。 |
方法
Properties() |
开始配置适用于模型中的所有属性的轻型约定。 (继承自 Convention) |
Properties<T>() |
开始配置适用于模型中指定类型的所有基元属性的轻型约定。 (继承自 Convention) |
Types() |
开始配置适用于模型中所有映射类型的轻型约定。 (继承自 Convention) |
Types<T>() |
开始配置轻量级约定,该约定适用于派生自指定类型或实现指定类型的模型中的所有映射类型。 (继承自 Convention) |