SyncSchemaForeignKeys::Add Method (String, String, array<String>, String, array<String>)

Adds a SyncSchemaForeignKey object to the end of the collection, with the specified constraint name, parent table and columns, and child table and columns.

Namespace:  Microsoft.Synchronization.Data
Assembly:  Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)

public:
SyncSchemaForeignKey^ Add(
	String^ foreignKeyName, 
	String^ parentTable, 
	array<String^>^ parentColumns, 
	String^ childTable, 
	array<String^>^ childColumns
)

Parameters

foreignKeyName
Type: System::String
The name of the foreign key constraint.
parentTable
Type: System::String
The name of the parent table.
parentColumns
Type: array<System::String>
An array of the primary key or unique columns in the parent table.
childTable
Type: System::String
The name of the child table.
childColumns
Type: array<System::String>
An array of the foreign key columns in the child table.

Return Value

Type: Microsoft.Synchronization.Data::SyncSchemaForeignKey
The SyncSchemaForeignKey object that was added to the collection.

ExceptionCondition
ArgumentException
  • parentTable or childTable, does not belong to the current data set,

—or—

  • childColumns or parentColumns contains a column which does not belong to the current data set.

Show: