Skip to content

CreateForeignKey Method ​

Definition ​

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

Constraint CreateForeignKey(string constrainedTable, string constrainedSchema, IForeignKey foreignKey) ​

csharp
Constraint CreateForeignKey(string constrainedTable, string constrainedSchema, IForeignKey foreignKey)

Creates a FOREIGN KEY constraint for the given table using foreignKey.

Parameters ​

NameDescription
constrainedSchemaSchema of the constrained table.
constrainedTableTable that owns the constrained column.
foreignKeyForeign-key definition (column, reference, optional name and actions).

Returns ​

A constraint ready for AddConstraint or DDL generation.