Click or drag to resize
AdapterExtensionMethodsFetchQueryAsyncTEntity, TCollection Method (IDataAccessAdapter, EntityQueryTEntity, TCollection)

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


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

Type Parameters

The type of the entity.
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).
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