Export (0) Print
Expand All

DataServiceContext.BeginExecuteBatch Method

Asynchronously submits a group of queries as a batch to the data service.

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

public IAsyncResult BeginExecuteBatch(
	AsyncCallback callback,
	Object state,
	params DataServiceRequest[] queries
)

Parameters

callback
Type: System.AsyncCallback

The delegate that is called when a response to the batch request is received.

state
Type: System.Object

User-defined state object that is used to pass context data to the callback method.

queries
Type: System.Data.Services.Client.DataServiceRequest[]

The array of query requests to include in the batch request.

Return Value

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

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

The queries are specified as DataServiceRequest<TElement> instances. Returns a DataServiceResponse that represents the response of the batch request as a whole. Individual query responses are represented as DataServiceResponse objects that can be accessed by enumerating the DataServiceResponse instance.

When this method returns, all of the HTTP response for the batch request has been read from the network stream but the responses have not been processed. No identity resolution or object materialization occurs for a specified entity in the response until it is enumerated.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft