Using the Column Attribute

Each property of the TimelineItem is decorated with a Column attribute, which tells the DataContext that the property is stored in a column by the same name. As with TableAttribute, you can use its Name property to specify a different name for the column in the database.

ColumnAttribute includes various other properties described in the following sections.


IsPrimaryKey is used to designate the member or members of the entity class that compose the primary key of the table. Composite keys are also supported by supplying more than one property decorated with a Column attribute with IsPrimaryKey set to true.

At least one member of an entity class must be designated as the primary key, or else the entity ...

Get Windows® Phone 8 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.