This documentation is archived and is not being maintained.
ObjectQuery Class
Visual Studio 2010
Implements common functionality for queries against a conceptual model using both LINQ to Entities and ObjectQuery<T>.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
The ObjectQuery type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | 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. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Execute | Executes the untyped object query with the specified merge option. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (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. |
| Name | Description | |
|---|---|---|
![]() | AsParallel | Enables parallelization of a query. (Defined by ParallelEnumerable.) |
![]() | AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
![]() | Cast<TResult>() | Overloaded. Converts the elements of an IQueryable to the specified type. (Defined by Queryable.) |
![]() | Cast<TResult>() | Overloaded. Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
![]() | OfType<TResult>() | Overloaded. Filters the elements of an IQueryable based on a specified type. (Defined by Queryable.) |
![]() | OfType<TResult>() | Overloaded. Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
| Name | Description | |
|---|---|---|
![]() ![]() | 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. |
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 (Entity Framework).
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:

