DataServiceQuery.BeginExecute Method

Asynchronously sends a request to execute the data service query.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

Syntax

'Declaration
Public Function BeginExecute ( _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As DataServiceQuery 
Dim callback As AsyncCallback 
Dim state As Object 
Dim returnValue As IAsyncResult 

returnValue = instance.BeginExecute(callback, _
    state)
public IAsyncResult BeginExecute(
    AsyncCallback callback,
    Object state
)
public:
IAsyncResult^ BeginExecute(
    AsyncCallback^ callback, 
    Object^ state
)
member BeginExecute : 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult
public function BeginExecute(
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult

Parameters

  • callback
    Type: System.AsyncCallback
    Delegate to invoke when results are available for client consumption.
  • state
    Type: System.Object
    User-defined state object passed to the callback.

Return Value

Type: System.IAsyncResult
An IAsyncResult object that is used to track the status of the asynchronous operation.

Remarks

The returned IAsyncResult object is used to determine when the asynchronous operation has completed. For more information, see Asynchronous Operations (WCF Data Services).

The BeginExecute method uses the same semantics as the Execute method, however BeginExecute asynchronously sends the request so that the call does not block processing while waiting for the results from the service. According to the standard begin-end asynchronous pattern, the provided callback is invoked when query results are retrieved.

See Also

Reference

DataServiceQuery Class

System.Data.Services.Client Namespace