SALES: 1-800-867-1380
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

DataServiceContext.EndExecute<TElement> Method (IAsyncResult)

Called to complete the BeginExecute.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)
public IEnumerable<TElement> EndExecute<TElement>(
	IAsyncResult asyncResult
)

Type Parameters

TElement

The type returned by the query.

Parameters

asyncResult
Type: System.IAsyncResult
IAsyncResult object.

Return Value

Type: System.Collections.Generic.IEnumerable<TElement>
The results returned by the query operation.
ExceptionCondition
ArgumentNullException

When asyncResult is null.

ArgumentException

When asyncResult did not originate from this DataServiceContext instance.

-or-

When the EndExecute method was previously called.

InvalidOperationException

When an error is raised either during execution of the request or when it converts the contents of the response message into objects.

DataServiceQueryException

When the data service returns an HTTP 404: Resource Not Found error.

According to the standard begin-end asynchronous pattern, the provided callback is invoked when query results are retrieved. For more information, see Asynchronous Operations (WCF Data Services).

When the callback is invoked, all results have been read from the HTTP stream, but they have not been processed; no local user-facing objects have been materialized or modified and identity resolution has not occurred. When EndExecute is invoked, a DataServiceResponse is created and returned but the results still have not been processed. Identity resolution, object materialization, and manipulation occur only when the user enumerates the results.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.