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 in progress, the command is wired to the transaction.

Namespace: MonoSoftware.LLBLGen
Assembly: MonoSoftware.LLBLGen (in MonoSoftware.LLBLGen.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public IDataReader FetchDataReader(
	IEntityFields2 fields,
	IRelationPredicateBucket filter,
	CommandBehavior readerBehavior,
	int maxNumberOfItemsToReturn,
	ISortExpression sortClauses,
	IGroupByCollection groupByClause,
	bool allowDuplicates,
	int pageNumber,
	int pageSize
)
Visual Basic
Public Function FetchDataReader ( 
	fields As IEntityFields2,
	filter As IRelationPredicateBucket,
	readerBehavior As CommandBehavior,
	maxNumberOfItemsToReturn As Integer,
	sortClauses As ISortExpression,
	groupByClause As IGroupByCollection,
	allowDuplicates As Boolean,
	pageNumber As Integer,
	pageSize As Integer
) As IDataReader
Visual C++
public:
virtual IDataReader^ FetchDataReader(
	IEntityFields2^ fields, 
	IRelationPredicateBucket^ filter, 
	CommandBehavior readerBehavior, 
	int maxNumberOfItemsToReturn, 
	ISortExpression^ sortClauses, 
	IGroupByCollection^ groupByClause, 
	bool allowDuplicates, 
	int pageNumber, 
	int pageSize
) sealed
F#
abstract FetchDataReader : 
        fields : IEntityFields2 * 
        filter : IRelationPredicateBucket * 
        readerBehavior : CommandBehavior * 
        maxNumberOfItemsToReturn : int * 
        sortClauses : ISortExpression * 
        groupByClause : IGroupByCollection * 
        allowDuplicates : bool * 
        pageNumber : int * 
        pageSize : int -> IDataReader 
override FetchDataReader : 
        fields : IEntityFields2 * 
        filter : IRelationPredicateBucket * 
        readerBehavior : CommandBehavior * 
        maxNumberOfItemsToReturn : int * 
        sortClauses : ISortExpression * 
        groupByClause : IGroupByCollection * 
        allowDuplicates : bool * 
        pageNumber : int * 
        pageSize : int -> IDataReader 

Parameters

fields
Type: IEntityFields2
The fields to use to build the query.
filter
Type: IRelationPredicateBucket
The filter.
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: ISortExpression
The sort clauses.
groupByClause
Type: IGroupByCollection
The group by clause.
allowDuplicates
Type: System..::..Boolean
If set to true, allow duplicates in the resultset, otherwise try to emit DISTINCT (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

Implements

IRepository..::..FetchDataReader(IEntityFields2, IRelationPredicateBucket, CommandBehavior, Int32, ISortExpression, IGroupByCollection, Boolean, Int32, Int32)

Remarks

Advanced functionality: be aware that the datareader returned is open, and the dataaccessadapter's connection is also open

See Also