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) |