Skip to content

PrimaryKeyAttribute Constructors ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Overloads ​

NameDescription
PrimaryKeyAttribute()Initializes a new instance of the PrimaryKeyAttribute class. Use this form when applying the attribute directly to a property.
PrimaryKeyAttribute(string propertyName, string primaryKeyName)Initializes a new instance of the PrimaryKeyAttribute class and specifies the name of the primary key property. Use this form when applying the attribute to a class.

PrimaryKeyAttribute() ​

csharp
PrimaryKeyAttribute()

Initializes a new instance of the PrimaryKeyAttribute class. Use this form when applying the attribute directly to a property.

PrimaryKeyAttribute(string propertyName, string primaryKeyName) ​

csharp
PrimaryKeyAttribute(string propertyName, string primaryKeyName)

Initializes a new instance of the PrimaryKeyAttribute class and specifies the name of the primary key property. Use this form when applying the attribute to a class.

Parameters ​

NameDescription
primaryKeyNameOptionally specify a specific name for the primary key
propertyNameThe name of the property to treat as the primary key.