Επεξεργασία

Κοινή χρήση μέσω


DataServiceContext.BeginExecuteBatch Method

Definition

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

public:
 IAsyncResult ^ BeginExecuteBatch(AsyncCallback ^ callback, System::Object ^ state, ... cli::array <System::Data::Services::Client::DataServiceRequest ^> ^ queries);
public IAsyncResult BeginExecuteBatch (AsyncCallback callback, object state, params System.Data.Services.Client.DataServiceRequest[] queries);
member this.BeginExecuteBatch : AsyncCallback * obj * System.Data.Services.Client.DataServiceRequest[] -> IAsyncResult
Public Function BeginExecuteBatch (callback As AsyncCallback, state As Object, ParamArray queries As DataServiceRequest()) As IAsyncResult

Parameters

callback
AsyncCallback

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

state
Object

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

queries
DataServiceRequest[]

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

Returns

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.

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.

Applies to