Appearance
ForeignKeyAttribute Constructors
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Overloads
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
relatedType | POCO 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
| Name | Description |
|---|---|
referenceColumn | Property or column name on the related type. When a property name is supplied, it is mapped through the same naming rules as other columns. |
relatedType | POCO 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
| Name | Description |
|---|---|
referenceColumn | Referenced column name. |
referenceSchema | Referenced table schema. |
referenceTable | Referenced table name. |
ForeignKeyAttribute(string referenceTable, string referenceColumn)
csharp
ForeignKeyAttribute(string referenceTable, string referenceColumn)Declares a foreign key using explicit table and column names.
Parameters
| Name | Description |
|---|---|
referenceColumn | Referenced column name. |
referenceTable | Referenced table name. |