This topic has not yet been rated - Rate this topic

DataServiceQuery<TElement> Class

March 22, 2012

Represents a single query request to an Open Data Protocol (OData) service.

System.Object
  System.Data.Services.Client.DataServiceRequest
    System.Data.Services.Client.DataServiceQuery
      System.Data.Services.Client.DataServiceQuery<TElement>

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
public class DataServiceQuery<TElement> : DataServiceQuery, 
	IQueryable<TElement>, IEnumerable<TElement>, IQueryable, IEnumerable

Type Parameters

TElement

Type of results returned by the query.

The DataServiceQuery<TElement> type exposes the following members.

  Name Description
Public property ElementType Returns the type of the object used in the template to create the DataServiceQuery instance. (Overrides DataServiceRequest.ElementType.)
Public property Expression Represents an expression that contains the query to the Open Data Protocol (OData) service. (Overrides DataServiceQuery.Expression.)
Public property Provider Represents the query provider instance. (Overrides DataServiceQuery.Provider.)
Public property RequestUri Gets the URI for the query. (Overrides DataServiceRequest.RequestUri.)
Top
  Name Description
Public method AddQueryOption Creates a new DataServiceQuery<TElement> that includes the query option in the URI that is generated by the returned query.
Public method BeginExecute Starts an asynchronous network operation that executes the query that is represented by this object instance.
Public method EndExecute Ends an asynchronous query request to an Open Data Protocol (OData) service.
Public method Equals (Inherited from Object.)
Public method Expand Creates a new DataServiceQuery<TElement> that includes the expand option in the URI that is generated by the returned query.
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method IncludeTotalCount Requests that the count of all entities in the entity set be returned inline with the query results.
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString Represents the URI of the query to the Open Data Protocol (OData) service. (Overrides DataServiceRequest.ToString().)
Top
  Name Description
Public Extension Method Subscribe<TElement>(IObserver<TElement>) Overloaded. Subscribes an observer to an enumerable sequence. Returns an object that can be used to unsubscribe the observer from the enumerable. (Defined by Observable.)
Public Extension Method Subscribe<TElement>(IObserver<TElement>, IScheduler) Overloaded. Subscribes an observer to an enumerable sequence. Returns an object that can be used to unsubscribe the observer from the enumerable. (Defined by Observable.)
Public Extension Method ToObservable<TElement>() Overloaded. Converts an enumerable sequence to an observable sequence. (Defined by Observable.)
Public Extension Method ToObservable<TElement>(IScheduler) Overloaded. Converts an enumerable sequence to an observable sequence. (Defined by Observable.)
Top
  Name Description
Explicit interface implemetation Private method IEnumerable<TElement>.GetEnumerator Executes the query and returns the result as a collection.
Explicit interface implemetation Private method IEnumerable.GetEnumerator Executes the query and returns the results as a collection.
Top

No public constructors are defined on this class. Object instances are created by using CreateQuery<T> on the DataServiceContext class.

Windows Phone OS

Supported in: 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)