DevForce Help Reference
TryExecuteQueryAsync<T>(IEntityQuery<T>,CancellationToken) Method


Return type
Executes the specified query asynchronously and returns a QueryResult<T>.
Syntax
'Declaration
 
<AsyncStateMachineAttribute(IdeaBlade.EntityModel.EntityManager+d__143`1[T])> 
Public Overloads Function TryExecuteQueryAsync(Of T)( _ 
   ByVal query As IEntityQuery(Of T), _ 
   ByVal cancellationToken As CancellationToken _ 
) As Task(Of QueryResult(Of T))
'Usage
 
Dim instance As EntityManager
Dim query As IEntityQuery(Of T)
Dim cancellationToken As CancellationToken
Dim value As Task(Of QueryResult(Of T))
 
value = instance.TryExecuteQueryAsync(Of T)(query, cancellationToken)
[AsyncStateMachine(IdeaBlade.EntityModel.EntityManager+d__143`1[T])] 
public Task<QueryResult<T>> TryExecuteQueryAsync<T>( 
   IEntityQuery<T> query, 
   CancellationToken cancellationToken 
)

Parameters

query
cancellationToken

Type Parameters

T
Return type

Return Value

QueryResult{T}
Remarks
Use TryExecuteQueryAsync when you need additional information about the query, including whether it was cancelled or an unhandled error was thrown. If the query is cancelled or an error occurs the task will still complete successfully and you can use the QueryResult<T> to examine the results.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityManager Class
EntityManager Members
Overload List

Send Feedback