Editare

Partajați prin


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
public abstract class ObjectQuery : System.Collections.IEnumerable, System.ComponentModel.IListSource, System.Linq.IOrderedQueryable
type ObjectQuery = class
    interface IOrderedQueryable
    interface IQueryable
    interface IEnumerable
    interface IListSource
type ObjectQuery = class
    interface IEnumerable
    interface IQueryable
    interface IOrderedQueryable
    interface IListSource
Public MustInherit Class ObjectQuery
Implements IEnumerable, IListSource, IOrderedQueryable
Inheritance
ObjectQuery
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

Returns the command text for the query.

Context

Gets the object context associated with this object query.

EnablePlanCaching

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

MergeOption

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

Parameters

Gets the parameter collection for this object query.

Methods

Equals(Object)

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

(Inherited from Object)
Execute(MergeOption)

Executes the untyped object query with the specified merge option.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetResultType()

Returns information about the result type of the query.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
ToTraceString()

Returns the commands to execute against the data source.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IListSource.ContainsListCollection

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

IListSource.GetList()

Returns the collection as an IList used for data binding.

IQueryable.ElementType

Gets the result element type for this query instance.

IQueryable.Expression

Gets the expression describing this query.

IQueryable.Provider

Gets the LINQ IQueryProvider associated with this query instance.

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Cast<TResult>(IQueryable)

Converts the elements of an IQueryable to the specified type.

OfType<TResult>(IQueryable)

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

Applies to

See also