This topic has not yet been rated - Rate this topic

DataServiceQuery<TElement> Class

July 26, 2012

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

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.

  NameDescription
Public propertyElementTypeReturns the type of the object used in the template to create the DataServiceQuery instance. (Overrides DataServiceRequest.ElementType.)
Public propertyExpressionRepresents an expression that contains the query to the Open Data Protocol (OData) service. (Overrides DataServiceQuery.Expression.)
Public propertyProviderRepresents the query provider instance. (Overrides DataServiceQuery.Provider.)
Public propertyRequestUriGets the URI for the query. (Overrides DataServiceRequest.RequestUri.)
Top
  NameDescription
Public methodAddQueryOptionCreates a new DataServiceQuery<TElement> that includes the query option in the URI that is generated by the returned query.
Public methodBeginExecuteStarts an asynchronous network operation that executes the query that is represented by this object instance.
Public methodEndExecuteEnds an asynchronous query request to an Open Data Protocol (OData) service.
Public methodEquals (Inherited from Object.)
Public methodExpandCreates a new DataServiceQuery<TElement> that includes the expand option in the URI that is generated by the returned query.
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodIncludeTotalCountRequests that the count of all entities in the entity set be returned inline with the query results.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToStringRepresents the URI of the query to the Open Data Protocol (OData) service. (Overrides DataServiceRequest.ToString().)
Top
  NameDescription
Explicit interface implemetationPrivate methodIEnumerable<TElement>.GetEnumeratorExecutes the query and returns the result as a collection.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorExecutes 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)
© 2013 Microsoft. All rights reserved.