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




KellermanSoftware.NetDataAccessLayer Namespace > ObjectCrud Class : SetForeignKeys<T,TU> Method
Generic class type
The parent object
A list of child objects
Set the foreign primaryKey of the child object to the primary key of the parent object
Syntax
Public Function SetForeignKeys
    (Of T,TU)( _
   ByVal parentObject As T, _
   ByVal childObjects As List(Of TU) _
) As Boolean
Dim instance As ObjectCrud
Dim parentObject As T
Dim childObjects As List(Of TU)
Dim value As Boolean
 
value = instance.SetForeignKeys(Of T, TU)(parentObject, childObjects)
public bool SetForeignKeys<T,TU>( 
   T parentObject,
   List<TU> childObjects
)
public: bool SetForeignKeys<T,TU>( 
   T* parentObject,
   List<TU*>* childObjects
) 
public:
bool SetForeignKeysgeneric<typename T>
generic<typename TU>
( 
   T^ parentObject,
   List<TU^>^ childObjects
) 

Parameters

parentObject
The parent object
childObjects
A list of child objects

Type Parameters

T
Generic class type
TU

Return Value

True if a foreign primaryKey was found
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

ObjectCrud Class
ObjectCrud Members