DbQuery Class
Represents a non-generic LINQ to Entities query against a DbContext.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")] [SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] public abstract class DbQuery : IOrderedQueryable, IQueryable, IEnumerable, IListSource, IDbAsyncEnumerable
Name | Description | |
---|---|---|
![]() | ElementType | The IQueryable element type. |
Name | Description | |
---|---|---|
![]() | AsNoTracking() | Returns a new query where the entities returned will not be cached in the DbContext. |
![]() | AsStreaming() | Obsolete.Returns a new query that will stream the results instead of buffering. |
![]() | Cast<TElement>() | Returns the equivalent generic DbQuery<TResult> object. |
![]() | Equals(Object) | Specifies whether the query is equal with the specified object.(Overrides Object.Equals(Object).) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | Gets the hash code associated with the query.(Overrides Object.GetHashCode().) |
![]() | GetType() | Gets the type associated with the query. |
![]() | Include(String) | Specifies the related objects to include in the query results. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | ToString() | Returns a String representation of the underlying query.(Overrides Object.ToString().) |
Name | Description | |
---|---|---|
![]() ![]() | IEnumerable.GetEnumerator() | Returns an IEnumerator which when enumerated will execute the query against the database. |
![]() ![]() | IListSource.GetList() | Throws an exception indicating that binding directly to a store query is not supported. Instead populate a DbSet with data, for example by using the Load extension method, and then bind to local data. For WPF bind to DbSet.Local. For Windows Forms bind to DbSet.Local.ToBindingList(). |
![]() ![]() | IDbAsyncEnumerable.GetAsyncEnumerator() | Returns an IDbAsyncEnumerator which when enumerated will execute the query against the database. |
Name | Description | |
---|---|---|
![]() | 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.) |
![]() | 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.