Share via


DataServiceQuery<TElement>.Execute Method

Definition

Executes the query and returns the results as a collection that implements IEnumerable.

public virtual System.Collections.Generic.IEnumerable<TElement> Execute ();
override this.Execute : unit -> seq<'Element>
Public Overridable Function Execute () As IEnumerable(Of TElement)

Returns

IEnumerable<TElement>

An IEnumerable<T> in which TElement represents the type of the query results.

Exceptions

When the data service returns an HTTP 404: Resource Not Found error.

When during materialization an object is encountered in the input stream that cannot be deserialized to an instance of TElement.

Applies to