DbQuery Class

 

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

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

System.Object
  System.Data.Entity.Infrastructure.DbQuery
    System.Data.Entity.DbSet

[SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
[SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public abstract class DbQuery : IOrderedQueryable, IQueryable, 
	IEnumerable, IListSource, IDbAsyncEnumerable

NameDescription
System_CAPS_pubpropertyElementType

The IQueryable element type.

NameDescription
System_CAPS_pubmethodAsNoTracking()

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

System_CAPS_pubmethodAsStreaming()

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

System_CAPS_pubmethodCast<TElement>()

Returns the equivalent generic DbQuery<TResult> object.

System_CAPS_pubmethodEquals(Object)

Specifies whether the query is equal with the specified object.(Overrides Object.Equals(Object).)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Gets the hash code associated with the query.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the type associated with the query.

System_CAPS_pubmethodInclude(String)

Specifies the related objects to include in the query results.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a String representation of the underlying query.(Overrides Object.ToString().)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodIListSource.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().

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbAsyncEnumerable.GetAsyncEnumerator()

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

NameDescription
System_CAPS_pubmethodForEachAsync(Action<Object>)

Overloaded. Asynchronously enumerates the query results and performs the specified action on each element.(Defined by QueryableExtensions.)

System_CAPS_pubmethodForEachAsync(Action<Object>, CancellationToken)

Overloaded. Asynchronously enumerates the query results and performs the specified action on each element.(Defined by QueryableExtensions.)

System_CAPS_pubmethodLoad()

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.)

System_CAPS_pubmethodLoadAsync()

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.)

System_CAPS_pubmethodLoadAsync(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.)

System_CAPS_pubmethodToListAsync()

Overloaded. Creates a List<T> from an IQueryable by enumerating it asynchronously.(Defined by QueryableExtensions.)

System_CAPS_pubmethodToListAsync(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.