DmForeignKeyConstraint
Namespace: MJCZone.DapperMatic.Models
Assembly: MJCZone.DapperMatic
Summary
Represents a foreign key constraint in a database.
Inheritance
Base Class: DmConstraint
public
Contents
Constructors (3) | Methods (4) | Properties (9)
Constructors
DmForeignKeyConstraint
Initializes a new instance of the DmForeignKeyConstraint class. Used for deserialization.
DmForeignKeyConstraint()DmForeignKeyConstraint
Initializes a new instance of the DmForeignKeyConstraint class. Used when schema name and table name are not necessary as when creating a table.
DmForeignKeyConstraint(
string constraintName,
DmOrderedColumn[] sourceColumns,
string referencedTableName,
DmOrderedColumn[] referencedColumns,
DmForeignKeyAction onDelete,
DmForeignKeyAction onUpdate)Parameters
constraintName (string) - The desired name for the new foreign key constraint.
sourceColumns (DmOrderedColumn[]) - An array of DmOrderedColumn objects representing the columns in the source table that are part of the foreign key.
referencedTableName (string) - The name of the table that is referenced by the foreign key constraint.
referencedColumns (DmOrderedColumn[]) - An array of DmOrderedColumn objects representing the columns in the referenced table that correspond to the source columns.
onDelete (DmForeignKeyAction) - .
onUpdate (DmForeignKeyAction) - .
DmForeignKeyConstraint
Initializes a new instance of the DmForeignKeyConstraint class.
DmForeignKeyConstraint(
string schemaName,
string tableName,
string constraintName,
DmOrderedColumn[] sourceColumns,
string referencedTableName,
DmOrderedColumn[] referencedColumns,
DmForeignKeyAction onDelete,
DmForeignKeyAction onUpdate)Parameters
schemaName (string) - The name of the schema containing the table with the foreign key constraint. Can be null if not specified, indicating the default schema.
tableName (string) - The name of the table that contains the foreign key constraint.
constraintName (string) - The desired name for the new foreign key constraint.
sourceColumns (DmOrderedColumn[]) - An array of DmOrderedColumn objects representing the columns in the source table that are part of the foreign key.
referencedTableName (string) - The name of the table that is referenced by the foreign key constraint.
referencedColumns (DmOrderedColumn[]) - An array of DmOrderedColumn objects representing the columns in the referenced table that correspond to the source columns.
onDelete (DmForeignKeyAction) - .
onUpdate (DmForeignKeyAction) - .
Methods
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
SchemaName
Gets or sets the schema name.
Type: string?
TableName
Gets or sets the table name.
Type: string
SourceColumns
Gets or sets the source columns.
Type: List<DmOrderedColumn>
ReferencedTableName
Gets or sets the referenced table name.
Type: string
ReferencedColumns
Gets or sets the referenced columns.
Type: List<DmOrderedColumn>
OnDelete
Gets or sets the action on delete.
Type: DmForeignKeyAction
OnUpdate
Gets or sets the action on update.
Type: DmForeignKeyAction
ConstraintType
Gets the constraint type.
Type: DmConstraintType
ConstraintName
Gets or sets the name of the constraint.
Type: object