Skip to content

ForeignKeyAttribute Constructors ​

Definition ​

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

Overloads ​

NameDescription
ForeignKeyAttribute(Type relatedType)Declares a foreign key that references the primary key of relatedType.
ForeignKeyAttribute(Type relatedType, string referenceColumn)Declares a foreign key that references a specific column on relatedType.
ForeignKeyAttribute(string referenceTable, string referenceColumn)Declares a foreign key using explicit table and column names.
ForeignKeyAttribute(string referenceSchema, string referenceTable, string referenceColumn)Declares a foreign key using explicit schema, table, and column names.

ForeignKeyAttribute(Type relatedType) ​

csharp
ForeignKeyAttribute(Type relatedType)

Declares a foreign key that references the primary key of relatedType.

Parameters ​

NameDescription
relatedTypePOCO type mapped to the referenced table.

ForeignKeyAttribute(Type relatedType, string referenceColumn) ​

csharp
ForeignKeyAttribute(Type relatedType, string referenceColumn)

Declares a foreign key that references a specific column on relatedType.

Parameters ​

NameDescription
referenceColumnProperty or column name on the related type. When a property name is supplied, it is mapped through the same naming rules as other columns.
relatedTypePOCO type mapped to the referenced table.

ForeignKeyAttribute(string referenceSchema, string referenceTable, string referenceColumn) ​

csharp
ForeignKeyAttribute(string referenceSchema, string referenceTable, string referenceColumn)

Declares a foreign key using explicit schema, table, and column names.

Parameters ​

NameDescription
referenceColumnReferenced column name.
referenceSchemaReferenced table schema.
referenceTableReferenced table name.

ForeignKeyAttribute(string referenceTable, string referenceColumn) ​

csharp
ForeignKeyAttribute(string referenceTable, string referenceColumn)

Declares a foreign key using explicit table and column names.

Parameters ​

NameDescription
referenceColumnReferenced column name.
referenceTableReferenced table name.