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




KellermanSoftware.NetDataAccessLayer Namespace > DataHelper Class : 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
Public Overridable Function SetForeignKeys
    (Of T,TU)( _
   ByVal parentObject As T, _
   ByVal childObjects As List(Of TU) _
) As Boolean
Dim instance As DataHelper
Dim parentObject As T
Dim childObjects As List(Of TU)
Dim value As Boolean
 
value = instance.SetForeignKeys(Of T, TU)(parentObject, childObjects)
public virtual bool SetForeignKeys<T,TU>( 
   T parentObject,
   List<TU> childObjects
)
public: virtual bool SetForeignKeys<T,TU>( 
   T* parentObject,
   List<TU*>* childObjects
) 
public:
virtual 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

DataHelper Class
DataHelper Members