IPrefetchPath2Add Method (IPrefetchPathElement2, Int32, IPredicateExpression, IEntityFactory2) |
Adds the specified element to the path.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.1.0.0 (5.1.0)
Syntax IPrefetchPathElement2 Add(
IPrefetchPathElement2 elementToAdd,
int maxAmountOfItemsToReturn,
IPredicateExpression additionalFilter,
IEntityFactory2 entityFactoryToUse
)
Function Add (
elementToAdd As IPrefetchPathElement2,
maxAmountOfItemsToReturn As Integer,
additionalFilter As IPredicateExpression,
entityFactoryToUse As IEntityFactory2
) As IPrefetchPathElement2
Parameters
- elementToAdd
- Type: SD.LLBLGen.Pro.ORMSupportClassesIPrefetchPathElement2
The PrefetchPathElement to add - maxAmountOfItemsToReturn
- Type: SystemInt32
Maximum amount of items to fetch of the set of entities specified by the element. - additionalFilter
- Type: SD.LLBLGen.Pro.ORMSupportClassesIPredicateExpression
Additional predicate expression to be added to the filter already in the PrefetchPathElement - entityFactoryToUse
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityFactory2
The entity factory to use to produce the related entities.
Return Value
Type:
IPrefetchPathElement2the element added, so chaining of commands is possible
Exceptions Exception | Condition |
---|
ArgumentException | When elementToAdd is not specifying a fetch meant for an entity of type rootEntityType set in the
constructor of this class |
See Also