Export (0) Print
Expand All

DbSet.SqlQuery Method

Entity Framework 5.0

Creates a raw SQL query that will return entities in this set. By default, the entities returned are tracked by the context; this can be changed by calling AsNoTracking on the DbSqlQuery<TEntity> returned from this method.

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

public DbSqlQuery SqlQuery(
	string sql,
	params Object[] parameters


Type: System.String

The SQL query string.

Type: System.Object[]

The parameters to apply to the SQL query string.

Return Value

Type: System.Data.Entity.Infrastructure.DbSqlQuery
A DbSqlQuery object that will execute the query when it is enumerated.
© 2014 Microsoft