ObjectQuery Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Data.Objects
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

System.Object
  System.Data.Objects.ObjectQuery
    System.Data.Objects.ObjectQuery<T>

public abstract class ObjectQuery : IEnumerable, IQueryable, 
	IOrderedQueryable, IListSource

NameDescription
System_CAPS_pubpropertyCommandText

Returns the command text for the query.

System_CAPS_pubpropertyContext

Gets the object context associated with this object query.

System_CAPS_pubpropertyEnablePlanCaching

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

System_CAPS_pubpropertyMergeOption

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

System_CAPS_pubpropertyParameters

Gets the parameter collection for this object query.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodExecute(MergeOption)

Executes the untyped object query with the specified merge option.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetResultType()

Returns information about the result type of the query.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodToTraceString()

Returns the commands to execute against the data source.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIListSource.GetList()

Returns the collection as an IList used for data binding.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIListSource.ContainsListCollection

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

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIQueryable.ElementType

Gets the result element type for this query instance.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIQueryable.Expression

Gets the expression describing this query.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIQueryable.Provider

Gets the LINQ IQueryProvider associated with this query instance.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

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.

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: