DbQuery DbQuery DbQuery Class

Definition

Represents a non-generic LINQ to Entities query against a DbContext.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.Diagnostics.DebuggerDisplay("{DebuggerDisplay()}")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="Casing is intentional")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification="Name is intentional")]
public abstract class DbQuery : System.Collections.IEnumerable, System.ComponentModel.IListSource, System.Data.Entity.Infrastructure.IDbAsyncEnumerable, System.Linq.IOrderedQueryable
type DbQuery = class
    interface IOrderedQueryable
    interface IQueryable
    interface IEnumerable
    interface IListSource
    interface IDbAsyncEnumerable
Public MustInherit Class DbQuery
Implements IDbAsyncEnumerable, IEnumerable, IListSource, IOrderedQueryable
Inheritance
DbQueryDbQueryDbQuery
Derived
Attributes
Implements

Properties

ElementType ElementType ElementType

The IQueryable element type.

Sql Sql Sql

Gets a String representation of the underlying query.

Methods

AsNoTracking() AsNoTracking() AsNoTracking()

Returns a new query where the entities returned will not be cached in the DbContext.

AsStreaming() AsStreaming() AsStreaming()

Returns a new query that will stream the results instead of buffering.

Cast<TElement>() Cast<TElement>() Cast<TElement>()

Returns the equivalent generic DbQuery<TResult> object.

Equals(Object) Equals(Object) Equals(Object)
GetHashCode() GetHashCode() GetHashCode()
GetType() GetType() GetType()
Include(String) Include(String) Include(String)

Specifies the related objects to include in the query results.

ToString() ToString() ToString()

Returns a String representation of the underlying query.

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an IEnumerator which when enumerated will execute the query against the database.

IListSource.ContainsListCollection IListSource.ContainsListCollection IListSource.ContainsListCollection

Returns false.

IListSource.GetList() IListSource.GetList() 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() IDbAsyncEnumerable.GetAsyncEnumerator() IDbAsyncEnumerable.GetAsyncEnumerator()

Returns an IDbAsyncEnumerator which when enumerated will execute the query against the database.

IQueryable.Expression IQueryable.Expression IQueryable.Expression

The IQueryable LINQ Expression.

IQueryable.Provider IQueryable.Provider IQueryable.Provider

The IQueryable provider.

Applies to