Knight Data Access Layer
SetForeignKeys<T,TU> Method (IDataHelper)




KellermanSoftware.NetDataAccessLayer Namespace > IDataHelper Interface : SetForeignKeys<T,TU> Method
Generic class type
The parent entity
A list of child entities
Set the foreign primaryKey of the child object to the primaryKey of the parent object. This is done automatically for SaveWithChildren
Syntax
Function SetForeignKeys
    (Of T,TU)( _
   ByVal parentObject As T, _
   ByVal childObjects As List(Of TU) _
) As Boolean
Dim instance As IDataHelper
Dim parentObject As T
Dim childObjects As List(Of TU)
Dim value As Boolean
 
value = instance.SetForeignKeys(Of T, TU)(parentObject, childObjects)
bool SetForeignKeys<T,TU>( 
   T parentObject,
   List<TU> childObjects
)
bool SetForeignKeys<T,TU>( 
   T* parentObject,
   List<TU*>* childObjects
) 
bool SetForeignKeysgeneric<typename T>
generic<typename TU>
( 
   T^ parentObject,
   List<TU^>^ childObjects
) 

Parameters

parentObject
The parent entity
childObjects
A list of child entities

Type Parameters

T
Generic class type
TU
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IDataHelper Interface
IDataHelper Members