Table of Contents

Class ColumnPrimaryKeyAttribute

Namespace
DataStax.AstraDB.DataApi.Tables
Assembly
DataStax.AstraDB.DataApi.dll

Marks a property or field as part of the table's partition key.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public class ColumnPrimaryKeyAttribute : Attribute, _Attribute
Inheritance
ColumnPrimaryKeyAttribute
Implements
Inherited Members

Constructors

ColumnPrimaryKeyAttribute()

Initializes a new instance of ColumnPrimaryKeyAttribute with a default order of 1.

public ColumnPrimaryKeyAttribute()

ColumnPrimaryKeyAttribute(int)

Initializes a new instance of ColumnPrimaryKeyAttribute with the specified order.

public ColumnPrimaryKeyAttribute(int order)

Parameters

order int

The order of this column within the partition key (1-based).

Properties

Order

The order of this column within the partition key (1-based).

public int Order { get; set; }

Property Value

int