Click or drag to resize
IDataAccessAdapterFetchEntityCollection Method (IEntityCollection2, IRelationPredicateBucket, Int32, ISortExpression, IPrefetchPath2, ExcludeIncludeFieldsList, Int32, Int32)
Fetches one or more entities which match the filter information in the filterBucket into the EntityCollection passed. The entity collection object has to contain an entity factory object which will be the factory for the entity instances to be fetched. It will apply paging and it will from there use a prefetch path fetch using the read page. It's important that pageSize is smaller than the set ParameterisedPrefetchPathThreshold. If pagesize is larger than the limits set for the ParameterisedPrefetchPathThreshold value, the query is likely to be slower than expected, though will work. If pageNumber / pageSize are set to values which disable paging, a normal prefetch path fetch will be performed.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: (5.3.0)
void FetchEntityCollection(
	IEntityCollection2 collectionToFill,
	IRelationPredicateBucket filterBucket,
	int maxNumberOfItemsToReturn,
	ISortExpression sortClauses,
	IPrefetchPath2 prefetchPath,
	ExcludeIncludeFieldsList excludedIncludedFields,
	int pageNumber,
	int pageSize


Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityCollection2
EntityCollection object containing an entity factory which has to be filled
Type: SD.LLBLGen.Pro.ORMSupportClassesIRelationPredicateBucket
filter information for retrieving the entities. If null, all entities are returned of the type created by the factory in the passed in EntityCollection instance.
Type: SystemInt32
The maximum amount of entities to return. If 0, all entities matching the filter are returned
Type: SD.LLBLGen.Pro.ORMSupportClassesISortExpression
SortClause expression which is applied to the query executed, sorting the fetch result.
Type: SD.LLBLGen.Pro.ORMSupportClassesIPrefetchPath2
Prefetch path to use.
Type: SD.LLBLGen.Pro.ORMSupportClassesExcludeIncludeFieldsList
The list of IEntityField2 objects which have to be excluded or included for the fetch. If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.
Type: SystemInt32
the page number to retrieve. First page is 1. When set to 0, no paging logic is applied
Type: SystemInt32
the size of the page. When set to 0, no paging logic is applied
ArgumentExceptionIf the passed in collectionToFill doesn't contain an entity factory.
Special thanks to Marcus Mac Innes ( for the paging optimization code.
See Also