DaoBaseGetAsDataReader Method (ITransaction, IEntityFields, IPredicate, IRelationCollection, CommandBehavior, Int32, Boolean) |
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.11.0.0 (5.11.23.1114)
Syntax public IDataReader GetAsDataReader(
ITransaction transactionToUse,
IEntityFields fields,
IPredicate filter,
IRelationCollection relations,
CommandBehavior readerBehavior,
int maxNumberOfItemsToReturn,
bool allowDuplicates
)
Public Function GetAsDataReader (
transactionToUse As ITransaction,
fields As IEntityFields,
filter As IPredicate,
relations As IRelationCollection,
readerBehavior As CommandBehavior,
maxNumberOfItemsToReturn As Integer,
allowDuplicates As Boolean
) As IDataReader
Parameters
- transactionToUse
- Type: SD.LLBLGen.Pro.ORMSupportClassesITransaction
The transaction to use, if you execute this method inside a transcation. Specify null otherwise - fields
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityFields
The fields to use to build the query. - filter
- Type: SD.LLBLGen.Pro.ORMSupportClassesIPredicate
The filter. - relations
- Type: SD.LLBLGen.Pro.ORMSupportClassesIRelationCollection
The relations. - readerBehavior
- Type: System.DataCommandBehavior
The reader behavior to set. - maxNumberOfItemsToReturn
- Type: SystemInt32
The max number of items to return. Specify 0 to return all elements - allowDuplicates
- Type: SystemBoolean
If set to true, allow duplicates in the resultset, otherwise it will emit DISTINCT into the query (if possible).
Return Value
Type:
IDataReaderOpen, ready to use IDataReader
Implements
IDaoGetAsDataReader(ITransaction, IEntityFields, IPredicate, IRelationCollection, CommandBehavior, Int32, Boolean)Remarks Advanced functionality: be aware that the datareader returned is open, and the connection used to open this datareader is also open
See Also