ObjectQuery Class
This class implements untyped queries at the object-layer.
Assembly: EntityFramework (in EntityFramework.dll)
System.Data.Entity.Core.Objects.ObjectQuery
System.Data.Entity.Core.Objects.ObjectQuery<T>
[SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")] [SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] public abstract class ObjectQuery : IOrderedQueryable, IQueryable, IEnumerable, IListSource, IDbAsyncEnumerable
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. |
![]() | Streaming | Whether the query is streaming or buffering |
Name | Description | |
---|---|---|
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Execute(MergeOption) | Executes the untyped object query with the specified merge option. |
![]() | ExecuteAsync(MergeOption) | Asynchronously executes the untyped object query with the specified merge option. |
![]() | ExecuteAsync(MergeOption, CancellationToken) | Asynchronously executes the untyped object query with the specified merge option. |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetResultType() | Returns information about the result type of the query. |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | ToString() | (Inherited from Object.) |
![]() | ToTraceString() | Returns the commands to execute against the data source. |
Name | Description | |
---|---|---|
![]() ![]() | IEnumerable.GetEnumerator() | Returns an enumerator that iterates through a collection. |
![]() ![]() | IListSource.GetList() | Returns the collection as an IList used for data binding. |
![]() ![]() | IDbAsyncEnumerable.GetAsyncEnumerator() | Returns an IDbAsyncEnumerator which when enumerated will execute the given SQL query against the database. |
Name | Description | |
---|---|---|
![]() | AsNoTracking() | Overloaded. Returns a new query where the entities returned will not be cached in the DbContext or ObjectContext. This method works by calling the AsNoTracking method of the underlying query object. If the underlying query object does not have an AsNoTracking method, then calling this method will have no affect.(Defined by QueryableExtensions.) |
![]() | AsStreaming() | Obsolete.Overloaded. Returns a new query that will stream the results instead of buffering. This method works by calling the AsStreaming method of the underlying query object. If the underlying query object does not have an AsStreaming method, then calling this method will have no affect.(Defined by QueryableExtensions.) |
![]() | ForEachAsync(Action<Object>) | Overloaded. Asynchronously enumerates the query results and performs the specified action on each element.(Defined by QueryableExtensions.) |
![]() | ForEachAsync(Action<Object>, CancellationToken) | Overloaded. Asynchronously enumerates the query results and performs the specified action on each element.(Defined by QueryableExtensions.) |
![]() | Include(String) | Overloaded. Specifies the related objects to include in the query results.(Defined by QueryableExtensions.) |
![]() | Load() | Enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.(Defined by QueryableExtensions.) |
![]() | LoadAsync() | Overloaded. Asynchronously enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.(Defined by QueryableExtensions.) |
![]() | LoadAsync(CancellationToken) | Overloaded. Asynchronously enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.(Defined by QueryableExtensions.) |
![]() | ToListAsync() | Overloaded. Creates a List<T> from an IQueryable by enumerating it asynchronously.(Defined by QueryableExtensions.) |
![]() | ToListAsync(CancellationToken) | Overloaded. Creates a List<T> from an IQueryable by enumerating it asynchronously.(Defined by QueryableExtensions.) |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.