Database::SqlQuery Method (Type, String, array<Object>)
Creates a raw SQL query that will return elements of the given type. The type can be any type that has properties that match the names of the columns returned from the query, or can be a simple primitive type. The type does not have to be an entity type. The results of this query are never tracked by the context even if the type of object returned is an entity type. Use the SqlQuery(String, array<Object>) method to return entities that are tracked by the context.
Assembly: EntityFramework (in EntityFramework.dll)
public: DbRawSqlQuery^ SqlQuery( Type^ elementType, String^ sql, ... array<Object^>^ parameters )
- Type: System::Type
The type of object returned by the query.
- Type: System::String
The SQL query string.
- Type: array<System::Object>
The parameters to apply to the SQL query string.