Click or drag to resize

IDao.GetAsDataReader Method (ITransaction, IEntityFields, IPredicate, IRelationCollection, CommandBehavior, Int32, ISortExpression, IGroupByCollection, Boolean, Int32, Int32)

Creates a new Retrieval query from the elements passed in and executes that retrievalquery to return an open, ready to use IDataReader. The datareader's command behavior is set to the readerBehavior passed in. If a transaction is specified, the command is wired to the transaction.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.4.0.0 (5.4.0)
Syntax
IDataReader GetAsDataReader(
	ITransaction transactionToUse,
	IEntityFields fields,
	IPredicate filter,
	IRelationCollection relations,
	CommandBehavior readerBehavior,
	int maxNumberOfItemsToReturn,
	ISortExpression sortClauses,
	IGroupByCollection groupByClause,
	bool allowDuplicates,
	int pageNumber,
	int pageSize
)

Parameters

transactionToUse
Type: SD.LLBLGen.Pro.ORMSupportClasses.ITransaction
The transaction to use, if you execute this method inside a transcation. Specify null otherwise
fields
Type: SD.LLBLGen.Pro.ORMSupportClasses.IEntityFields
The fields to use to build the query.
filter
Type: SD.LLBLGen.Pro.ORMSupportClasses.IPredicate
The filter.
relations
Type: SD.LLBLGen.Pro.ORMSupportClasses.IRelationCollection
The relations.
readerBehavior
Type: System.Data.CommandBehavior
The reader behavior to set.
maxNumberOfItemsToReturn
Type: System.Int32
The max number of items to return. Specify 0 to return all elements
sortClauses
Type: SD.LLBLGen.Pro.ORMSupportClasses.ISortExpression
The sort clauses.
groupByClause
Type: SD.LLBLGen.Pro.ORMSupportClasses.IGroupByCollection
The group by clause.
allowDuplicates
Type: System.Boolean
If set to true, allow duplicates in the resultset, otherwise it will emit DISTINCT into the query (if possible).
pageNumber
Type: System.Int32
The page number.
pageSize
Type: System.Int32
Size of the page.

Return Value

Type: IDataReader
Open, ready to use IDataReader
Remarks
Advanced functionality: be aware that the datareader returned is open, and the connection used to open this datareader is also open
See Also