DbRawSqlQuery Class
Represents a SQL query for non-entities that is created from a DbContext and is executed using the connection from that context. Instances of this class are obtained from the Database instance. The query is not executed when this object is created; it is executed each time it is enumerated, for example by using foreach. SQL queries for entities are created using SqlQuery. See DbRawSqlQuery<TElement> for a generic version of this class.
Assembly: EntityFramework (in EntityFramework.dll)
System.Data.Entity.Infrastructure.DbRawSqlQuery
System.Data.Entity.Infrastructure.DbSqlQuery
Name | Description | |
---|---|---|
![]() | AsStreaming() | Obsolete.Returns a new query that will stream the results instead of buffering. |
![]() | Equals(Object) | Specifies whether the query is equal to the specified object.(Overrides Object.Equals(Object).) |
![]() | Finalize() | (Inherited from Object.) |
![]() | ForEachAsync(Action<Object>) | Asynchronously enumerates the query results and performs the specified action on each element. |
![]() | ForEachAsync(Action<Object>, CancellationToken) | Asynchronously enumerates the query results and performs the specified action on each element. |
![]() | GetEnumerator() | Returns an IEnumerator which when enumerated will execute the SQL query against the database. |
![]() | GetHashCode() | Gets the hash code associated with the query.(Overrides Object.GetHashCode().) |
![]() | GetType() | Gets the type associated with the query. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | ToListAsync() | Creates a List<T> from the query by enumerating it asynchronously. |
![]() | ToListAsync(CancellationToken) | Creates a List<T> from the query by enumerating it asynchronously. |
![]() | ToString() | Returns a String that contains the SQL string that was set when the query was created. The parameters are not included.(Overrides Object.ToString().) |
Name | Description | |
---|---|---|
![]() ![]() | IListSource.GetList() | Throws an exception indicating that binding directly to a store query is not supported. |
![]() ![]() | IDbAsyncEnumerable.GetAsyncEnumerator() | Returns an IDbAsyncEnumerable which when enumerated will execute the SQL query against the database. |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.