DataSource.ExecuteNObjects(T) Method

System.Data.Generic

DataSourceExecuteNObjectsT Method
Executes the query, and returns a collection of object by the type T; hieratically compounded by the provided SQL JOIN and realted classes.

Namespace: System.Data.Generic
Assembly: System.Data.Generic (in System.Data.Generic.dll) Version: 1.9.5473.30542 (1.9.5473.2392)
Syntax
public List<T> ExecuteNObjects<T>(
	string SQL
)
where T : class
Public Function ExecuteNObjects(Of T As Class) ( 
	SQL As String
) As List(Of T)
public:
generic<typename T>
where T : ref class
List<T>^ ExecuteNObjects(
	String^ SQL
)
member ExecuteNObjects : 
        SQL : string -> List<'T>  when 'T : not struct

Parameters

SQL
Type: SystemString
SQL statement to execute. SQL statement must have an 'ORDER BY' statement. Should be a JOIN statement, otherwise please use ExecuteObjects for performance.

Type Parameters

T
Type to return in list. This must be a managed object.

Return Value

Type: ListT
Collections of object, type T - populated based on class references and provided tables.
Exceptions
ExceptionCondition
ArgumentNullExceptionIn case the SQL is null.
SqlExceptionIn case the underlying connection cause an exception.
Remarks
THIS FEATURE IS A PRE-RELEASE. MAY NOT BE STABLE.
See Also