Knight Data Access Layer
LoadOne<T>(String,Dictionary<String,Object>,String) Method




KellermanSoftware.NetDataAccessLayer Namespace > DataHelper Class > LoadOne Method : LoadOne<T>(String,Dictionary<String,Object>,String) Method
Generic object type
The where clause to use as the filter
The parameters for the where clause
What to order the record by
Load the first record matching the where clause
Syntax
Public Overloads Function LoadOne(Of T As {Class, New})( _
   ByVal whereClause As String, _
   ByVal parameters As Dictionary(Of String,Object), _
   ByVal orderBy As String _
) As T
Dim instance As DataHelper
Dim whereClause As String
Dim parameters As Dictionary(Of String,Object)
Dim orderBy As String
Dim value As T
 
value = instance.LoadOne(Of T)(whereClause, parameters, orderBy)
public T LoadOne<T>( 
   string whereClause,
   Dictionary<string,object> parameters,
   string orderBy
)
where T: class, new()
public: T* LoadOne<T>( 
   string* whereClause,
   Dictionary<string*,Object*>* parameters,
   string* orderBy
) 
where T: ref class, gcnew()
public:
T^ LoadOnegeneric<typename T>
( 
   String^ whereClause,
   Dictionary<String^,Object^>^ parameters,
   String^ orderBy
) 
where T: ref class, gcnew()

Parameters

whereClause
The where clause to use as the filter
parameters
The parameters for the where clause
orderBy
What to order the record by

Type Parameters

T
Generic object type
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
Overload List