DataServiceQuery<TElement>.AddQueryOption(String, Object) Method

Definition

Creates a new DataServiceQuery<TElement> with the query option set in the URI generated by the returned query.

public virtual Microsoft.OData.Client.DataServiceQuery<TElement> AddQueryOption (string name, object value);
abstract member AddQueryOption : string * obj -> Microsoft.OData.Client.DataServiceQuery<'Element>
override this.AddQueryOption : string * obj -> Microsoft.OData.Client.DataServiceQuery<'Element>
Public Overridable Function AddQueryOption (name As String, value As Object) As DataServiceQuery(Of TElement)

Parameters

name
String

The string value that contains the name of the query string option to add.

value
Object

The object that contains the value of the query string option.

Returns

A new query that includes the requested query option appended to the URI of the supplied query

Applies to