Skip to content

ForeignKey Class ​

Definition ​

Maintain a FOREIGN KEY constraint with another table

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

Constructors ​

NameDescription
ForeignKey()Create empty instance
ForeignKey(string keyName, string constrainedColumn, string referenceTable, string referenceColumn)Create with Name, Column, and Table
ForeignKey(string keyName, string constrainedColumn, string schema, string referenceTable, string referenceColumn)Create with Name, Column, Schema, and Table

Properties ​

NameDescription
ColumnConstrained Column
OnDeleteAction when a referenced row is deleted
OnUpdateAction when a referenced key is updated
ReferenceColumnColumns referenced in the foreign table
TableNameName of the foreign table

Methods ​

NameDescription
ForeignKey Copy()Creates a deep copy of this foreign key definition.
string GetKeyName()Returns the Name value, or generates a default FOREIGN KEY name using a pattern
bool IsValidDefinition()Verifies the validity of the requested FOREIGN KEY based on current values