DevForce Help Reference
ExecuteAsync(IEntityQuery,Action<EntityQueryOperation>,Object) Method
Example 


This query
Callback invoked when the query completes
Token to identify the query upon completion
Execute the query asynchronously.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function ExecuteAsync( _
   ByVal query As IEntityQuery, _
   ByVal userCallback As Action(Of EntityQueryOperation), _
   Optional ByVal userState As Object _
) As EntityQueryOperation
'Usage
 
Dim query As IEntityQuery
Dim userCallback As Action(Of EntityQueryOperation)
Dim userState As Object
Dim value As EntityQueryOperation
 
value = EntityQueryAsyncExtensions.ExecuteAsync(query, userCallback, userState)

Parameters

query
This query
userCallback
Callback invoked when the query completes
userState
Token to identify the query upon completion
Remarks
Provide a userCallback if you want to be notified when the operation completes. The query results will be returned in the IdeaBlade.EntityModel.EntityQueriedEventArgs passed to the userCallback. Use the userState to uniquely identify this call.
Example
DomainModelEntityManager mgr = new DomainModelEntityManager();

var query = mgr.Customers.Where(c => c.Country == "UK");
query.ExecuteAsync(op => {
  var customers = op.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

EntityQueryAsyncExtensions Class
EntityQueryAsyncExtensions Members
Overload List
ExecuteQueryAsync(IEntityQuery) Method

Send Feedback