Add a foreign key from a given table to the key of another table.

Namespace:  Mindscape.LightSpeed.Migrations
Assembly:  Mindscape.LightSpeed.Migrations (in Mindscape.LightSpeed.Migrations.dll)
Version: 3.1.0.0 (4.0.0.0)

Syntax

C#
protected void AddForeignKeyColumn(
	string fromTableName,
	string name,
	ModelDataType keyType,
	bool nullable,
	string toTableName,
	string toColumnName
)
Visual Basic (Declaration)
Protected Sub AddForeignKeyColumn ( _
	fromTableName As String, _
	name As String, _
	keyType As ModelDataType, _
	nullable As Boolean, _
	toTableName As String, _
	toColumnName As String _
)

Parameters

fromTableName
Type: System..::.String
The table referencing a foreign table.
name
Type: System..::.String
The name of the foreign key association.
keyType
Type: Mindscape.LightSpeed.Migrations..::.ModelDataType
The type of the key being referenced.
nullable
Type: System..::.Boolean
If the relationship is nullable.
toTableName
Type: System..::.String
The table being referenced.
toColumnName
Type: System..::.String
The column being referenced.

See Also