DbRawSqlQuery Class

Entity Framework 6.0
 

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.

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

System.Object
  System.Data.Entity.Infrastructure.DbRawSqlQuery
    System.Data.Entity.Infrastructure.DbSqlQuery

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

NameDescription
System_CAPS_pubmethodAsStreaming()

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

System_CAPS_pubmethodEquals(Object)

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

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodForEachAsync(Action<Object>)

Asynchronously enumerates the query results and performs the specified action on each element.

System_CAPS_pubmethodForEachAsync(Action<Object>, CancellationToken)

Asynchronously enumerates the query results and performs the specified action on each element.

System_CAPS_pubmethodGetEnumerator()

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

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_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToListAsync()

Creates a List<T> from the query by enumerating it asynchronously.

System_CAPS_pubmethodToListAsync(CancellationToken)

Creates a List<T> from the query by enumerating it asynchronously.

System_CAPS_pubmethodToString()

Returns a String that contains the SQL string that was set when the query was created. The parameters are not included.(Overrides Object.ToString().)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIListSource.GetList()

Throws an exception indicating that binding directly to a store query is not supported.

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

Return to top
Show: