Udostępnij za pośrednictwem


DataServiceContext.Execute<TElement> Method (Uri, String, Boolean, array<OperationParameter[])

Sends a request to the data service to execute a specific URI by using a specific HTTP method.

Not supported by the WCF Data Services 5.0 client for Silverlight.

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

Syntax

'Declaration
Public Function Execute(Of TElement) ( _
    requestUri As Uri, _
    httpMethod As String, _
    singleResult As Boolean, _
    ParamArray operationParameters As OperationParameter() _
) As IEnumerable(Of TElement)
'Usage
Dim instance As DataServiceContext 
Dim requestUri As Uri 
Dim httpMethod As String 
Dim singleResult As Boolean 
Dim operationParameters As OperationParameter()
Dim returnValue As IEnumerable(Of TElement)

returnValue = instance.Execute(requestUri, _
    httpMethod, singleResult, operationParameters)
public IEnumerable<TElement> Execute<TElement>(
    Uri requestUri,
    string httpMethod,
    bool singleResult,
    params OperationParameter[] operationParameters
)
public:
generic<typename TElement>
IEnumerable<TElement>^ Execute(
    Uri^ requestUri, 
    String^ httpMethod, 
    bool singleResult, 
    ... array<OperationParameter^>^ operationParameters
)
member Execute : 
        requestUri:Uri * 
        httpMethod:string * 
        singleResult:bool * 
        operationParameters:OperationParameter[] -> IEnumerable<'TElement> 
JScript does not support generic types and methods.

Type Parameters

  • TElement
    The type returned by the query.

Parameters

  • requestUri
    Type: System.Uri
    The URI to which the query request will be sent. The URI may be any valid data service URI. Can contain $ query parameters.
  • httpMethod
    Type: System.String
    The HTTP data transfer method used by the client.
  • singleResult
    Type: System.Boolean
    Attribute used on service operations to specify that they return a single instance of their return element.

Return Value

Type: System.Collections.Generic.IEnumerable<TElement>
Returns IEnumerable<T>.

See Also

Reference

DataServiceContext Class

Execute Overload

System.Data.Services.Client Namespace