Skip to content

DmPrimaryKeyConstraint ​

Namespace: MJCZone.DapperMatic.Models

Assembly: MJCZone.DapperMatic

Summary ​

Represents a primary key constraint on a table.

Inheritance ​

Base Class: DmConstraint

public

Contents ​

Constructors (3) | Methods (4) | Properties (6)

Constructors ​

DmPrimaryKeyConstraint ​

Initializes a new instance of the DmPrimaryKeyConstraint class. Used for deserialization.

csharp
DmPrimaryKeyConstraint()

DmPrimaryKeyConstraint ​

Initializes a new instance of the DmPrimaryKeyConstraint class. Used when schema name and table name are not necessary as when creating a table.

csharp
DmPrimaryKeyConstraint(string constraintName, DmOrderedColumn[] columns)

Parameters ​

  • constraintName (string) - The constraint name.
  • columns (DmOrderedColumn[]) - The columns that make up the primary key.

DmPrimaryKeyConstraint ​

Initializes a new instance of the DmPrimaryKeyConstraint class.

csharp
DmPrimaryKeyConstraint(
    string schemaName,
    string tableName,
    string constraintName,
    DmOrderedColumn[] columns)

Parameters ​

  • schemaName (string) - The schema name.
  • tableName (string) - The table name.
  • constraintName (string) - The constraint name.
  • columns (DmOrderedColumn[]) - The columns that make up the primary key.

Methods ​

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()

Properties ​

SchemaName ​

Gets or sets the schema name.

Type: string?

TableName ​

Gets or sets the table name.

Type: string

Columns ​

Gets or sets the columns.

Type: List<DmOrderedColumn>

ConstraintType ​

Gets the type of the constraint.

Type: DmConstraintType

ConstraintName ​

Gets or sets the name of the constraint.

Type: object

PreviousNames ​

Gets or sets the names this constraint has had before, most recent first.

Type: object