你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TableColumnAttribute 类

定义

TableColumnAttribute可用于批注表示 所使用的TableController<TData>系统属性的数据模型属性。 通过指示哪些列是 ID、版本、createdAt 等。列中,各个域管理员可以利用这些信息来提供与任何特定后端存储的最佳映射。

[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class TableColumnAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type TableColumnAttribute = class
    inherit Attribute
Public NotInheritable Class TableColumnAttribute
Inherits Attribute
继承
TableColumnAttribute
属性

构造函数

TableColumnAttribute(TableColumnType)

使用给定 columnTypeTableColumnAttribute 初始化 的新实例。

属性

ColumnType

TableColumnType此属性应用于的 属性。

TableColumnAnnotation

使用模型生成器代码第一约定向 Entity Framework 注册 TableColumnAttribute 时,请使用此名称作为表列注释名称。 有关实体框架代码优先约定和代码注释的详细信息,请参阅 https://entityframework.codeplex.com/wikipage?title=Code%20First%20Annotations

适用于