ObjectQuery ObjectQuery ObjectQuery ObjectQuery Class

Definition

Implements common functionality for queries against a conceptual model using both LINQ to Entities and ObjectQuery<T>.

public ref class ObjectQuery abstract : System::Collections::IEnumerable, System::ComponentModel::IListSource, System::Linq::IOrderedQueryable, System::Linq::IQueryable
public abstract class ObjectQuery : System.Collections.IEnumerable, System.ComponentModel.IListSource, System.Linq.IOrderedQueryable, System.Linq.IQueryable
type ObjectQuery = class
    interface IEnumerable
    interface IQueryable
    interface IOrderedQueryable
    interface IListSource
Public MustInherit Class ObjectQuery
Implements IEnumerable, IListSource, IOrderedQueryable, IQueryable
Inheritance
ObjectQueryObjectQueryObjectQueryObjectQuery
Derived
Implements

Remarks

ObjectQuery is the base class for queries against a conceptual model. ObjectQuery is provided to ensure that LINQ to Entities queries have the same functionality as queries executed using ObjectQuery<T>. You must use ObjectQuery<T> with a specified type to query a conceptual model. For more information, see Object Queries.

Properties

CommandText CommandText CommandText CommandText

Returns the command text for the query.

Context Context Context Context

Gets the object context associated with this object query.

EnablePlanCaching EnablePlanCaching EnablePlanCaching EnablePlanCaching

Gets or sets a value that indicates whether the query plan should be cached.

MergeOption MergeOption MergeOption MergeOption

Gets or sets how objects returned from a query are added to the object context.

Parameters Parameters Parameters Parameters

Gets the parameter collection for this object query.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Execute(MergeOption) Execute(MergeOption) Execute(MergeOption) Execute(MergeOption)

Executes the untyped object query with the specified merge option.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetResultType() GetResultType() GetResultType() GetResultType()

Returns information about the result type of the query.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
ToTraceString() ToTraceString() ToTraceString() ToTraceString()

Returns the commands to execute against the data source.

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IListSource.ContainsListCollection IListSource.ContainsListCollection IListSource.ContainsListCollection IListSource.ContainsListCollection

Gets a value that indicates whether the collection returned by the query contains collection objects.

IListSource.GetList() IListSource.GetList() IListSource.GetList() IListSource.GetList()

Returns the collection as an IList used for data binding.

IQueryable.ElementType IQueryable.ElementType IQueryable.ElementType IQueryable.ElementType

Gets the result element type for this query instance.

IQueryable.Expression IQueryable.Expression IQueryable.Expression IQueryable.Expression

Gets the expression describing this query.

IQueryable.Provider IQueryable.Provider IQueryable.Provider IQueryable.Provider

Gets the LINQ IQueryProvider associated with this query instance.

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Cast<TResult>(IQueryable) Cast<TResult>(IQueryable) Cast<TResult>(IQueryable) Cast<TResult>(IQueryable)

Converts the elements of an IQueryable to the specified type.

OfType<TResult>(IQueryable) OfType<TResult>(IQueryable) OfType<TResult>(IQueryable) OfType<TResult>(IQueryable)

Filters the elements of an IQueryable based on a specified type.

Applies to

See also