DbQuery<TResult> DbQuery<TResult> DbQuery<TResult> Class

Definition

Represents a LINQ to Entities query against a DbContext.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification="Name is intentional")]
[System.Diagnostics.DebuggerDisplay("{DebuggerDisplay()}")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="Casing is intentional")]
public class DbQuery<TResult> : System.Collections.Generic.IEnumerable<TResult>, System.ComponentModel.IListSource, System.Data.Entity.Infrastructure.IDbAsyncEnumerable<TResult>, System.Linq.IOrderedQueryable<TResult>, System.Linq.IQueryable<TResult>
type DbQuery<'Result> = class
    interface IOrderedQueryable<'Result>
    interface IQueryable<'Result>
    interface seq<'Result>
    interface IOrderedQueryable
    interface IQueryable
    interface IEnumerable
    interface IListSource
    interface IDbAsyncEnumerable<'Result>
    interface IDbAsyncEnumerable
Public Class DbQuery(Of TResult)
Implements IDbAsyncEnumerable(Of TResult), IEnumerable(Of TResult), IListSource, IOrderedQueryable(Of TResult), IQueryable(Of TResult)

Type Parameters

TResult

The type of entity to query for.

Inheritance
DbQuery<TResult>DbQuery<TResult>DbQuery<TResult>
Derived
Attributes
Implements

Properties

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.

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.

Operators

Implicit(DbQuery<TResult> to DbQuery) Implicit(DbQuery<TResult> to DbQuery) Implicit(DbQuery<TResult> to DbQuery)

Returns a new instance of the non-generic DbQuery class for this query.

Explicit Interface Implementations

IEnumerable<TResult>.GetEnumerator() IEnumerable<TResult>.GetEnumerator() IEnumerable<TResult>.GetEnumerator()

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

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

Returns an IEnumerator<T> 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.

IDbAsyncEnumerable<TResult>.GetAsyncEnumerator() IDbAsyncEnumerable<TResult>.GetAsyncEnumerator() IDbAsyncEnumerable<TResult>.GetAsyncEnumerator()

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

IQueryable.ElementType IQueryable.ElementType IQueryable.ElementType

The IQueryable element type.

IQueryable.Expression IQueryable.Expression IQueryable.Expression

The IQueryable LINQ Expression.

IQueryable.Provider IQueryable.Provider IQueryable.Provider

The IQueryable provider.

Applies to