共用方式為


TableColumnAttribute Class

Definition

The TableColumnAttribute can be used to annotate data model properties that represent system properties used by the TableController<TData>. By indicating which columns are the id, version, createdAt, etc. columns, the various domain managers can leverage that information to provide the best possible mapping to any particular backend store.

[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
Inheritance
TableColumnAttribute
Attributes

Constructors

TableColumnAttribute(TableColumnType)

Initializes a new instance of the TableColumnAttribute with a given columnType.

Properties

ColumnType

The TableColumnType for property this attribute is applied to.

TableColumnAnnotation

When registering the TableColumnAttribute with Entity Framework using a model builder code first convention, use this name as the table column annotation name. See https://entityframework.codeplex.com/wikipage?title=Code%20First%20Annotations for more information about Entity Framework code first conventions and code annotations.

Applies to