Click or drag to resize

AdapterExtensionMethodsFetchQueryAsyncTEntity, TCollection Method (IDataAccessAdapter, EntityQueryTEntity, TCollection, CancellationToken)

Namespace:  SD.LLBLGen.Pro.QuerySpec.Adapter
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.5.0.0 (5.5.18.1019)
Syntax
public static Task<TCollection> FetchQueryAsync<TEntity, TCollection>(
	this IDataAccessAdapter adapter,
	EntityQuery<TEntity> query,
	TCollection collectionToFill,
	CancellationToken cancellationToken
)
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.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token

Type Parameters

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

Return Value

Type: TaskTCollection
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