Compartilhar via


DomainClient.BeginQuery Method

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Executes an asynchronous query operation.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

Syntax

'Declaration
Public Function BeginQuery ( _
    query As EntityQuery, _
    callback As AsyncCallback, _
    userState As Object _
) As IAsyncResult
'Usage
Dim instance As DomainClient
Dim query As EntityQuery
Dim callback As AsyncCallback
Dim userState As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginQuery(query, _
    callback, userState)
public IAsyncResult BeginQuery(
    EntityQuery query,
    AsyncCallback callback,
    Object userState
)
public:
IAsyncResult^ BeginQuery(
    EntityQuery^ query, 
    AsyncCallback^ callback, 
    Object^ userState
)
member BeginQuery : 
        query:EntityQuery * 
        callback:AsyncCallback * 
        userState:Object -> IAsyncResult 
public function BeginQuery(
    query : EntityQuery, 
    callback : AsyncCallback, 
    userState : Object
) : IAsyncResult

Parameters

  • userState
    Type: System.Object
    Optional user state associated with this operation.

Return Value

Type: System.IAsyncResult
An asynchronous result that identifies this query.

Exceptions

Exception Condition
[ArgumentNullException]

query or callback is nulla null reference (Nothing in Visual Basic).

Remarks

Queries with side-effects may be invoked differently. For example, clients that invoke a domain service over HTTP may use POST requests for queries with side-effects, while GET may be used otherwise.

See Also

Reference

DomainClient Class

System.ServiceModel.DomainServices.Client Namespace