Click or drag to resize
AdapterExtensionMethodsFetchQueryTEntity, TCollection Method (IDataAccessAdapter, EntityQueryTEntity, TCollection)
Fetches the query specified on the adapter specified into the collectionToFill specified.

Namespace:  SD.LLBLGen.Pro.QuerySpec.Adapter
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.3.0.0 (5.3.0)
Syntax
public static TCollection FetchQuery<TEntity, TCollection>(
	this IDataAccessAdapter adapter,
	EntityQuery<TEntity> query,
	TCollection collectionToFill
)
where TEntity : IEntity2
where TCollection : IEntityCollection2

Parameters

adapter
Type: SD.LLBLGen.Pro.ORMSupportClassesIDataAccessAdapter
The adapter.
query
Type: SD.LLBLGen.Pro.QuerySpecEntityQueryTEntity
The query.
collectionToFill
Type: TCollection
The collection to fill.

Type Parameters

TEntity
The type of the entity.
TCollection
The type of the collection.

Return Value

Type: TCollection
collectionToFill, filled with the query fetch results.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataAccessAdapter. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Equal to calling adapter.FetchEntityCollection(), so entities already present in collectionToFill are left as-is. If the fetch has to take into account a Context, the passed collectionToFill has to be assigned to the context before calling this method.
See Also