Find a GetPage of items from the repository based on a sql condition

Namespace: DotNetNuke.Data
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
IPagedList<T> Find(
	int pageIndex,
	int pageSize,
	string sqlCondition,
	params Object[] args
)
Visual Basic
Function Find ( 
	pageIndex As Integer,
	pageSize As Integer,
	sqlCondition As String,
	ParamArray args As Object()
) As IPagedList(Of T)

Parameters

pageIndex
Type: System..::..Int32
The page Index to fetch
pageSize
Type: System..::..Int32
The size of the page to fetch
sqlCondition
Type: System..::..String
The sql condition e.g. "WHERE ArticleId = @0"
args
Type: array<System..::..Object>[]()[][]
A collection of arguments to be mapped to the tokens in the sqlCondition

Return Value

A list of items

Remarks

Find supports both full SQL statements such as "SELECT * FROM table WHERE ..." as well as a SQL condition like "WHERE ..."

See Also