Entity SQL Overview
Entity SQL is similar to the Transact-SQL language, and it is provided by the ADO.NET Entity Framework to support the Entity Data Model (EDM). The EDM represents application data as a set of entities and relationships that are mapped to a defined data source. Entity SQL supports EDM constructs, enabling users to effectively query the data represented by an entity model. For information about the EDM, see Entity Data Model.
The Entity Framework works with storage-specific data providers to translate generic Entity SQL into storage-specific queries. The EntityClient provider supplies a way to execute an Entity SQL command against an entity model and return rich types of data including scalar results, result sets, and object graphs. When you construct EntityCommand objects, you can specify a stored procedure name or the text of a query by assigning an Entity SQL query string to its System.Data.EntityClient.EntityCommand.CommandText property. The EntityDataReader exposes the results of executing a EntityCommand against an EDM. To execute the command that returns the EntityDataReader, call ExecuteReader. For more information, see Working with EntityClient (Entity Framework Tasks).
In addition to the EntityClient provider, Object Services enables you to use Entity SQL to execute queries against an Entity Data Model and return data as strongly-typed CLR objects that are instances of entity types. For more information, see Object Services (Entity Framework).
This section provides conceptual information about Entity SQL.
In This Section
- How Entity SQL Differs from Transact-SQL
Describes differences between Entity SQL and Transact-SQL.
- Entity SQL Quick Reference
Provides a quick reference to Entity SQL queries.
- Type System (Entity SQL)
Discusses the anonymous types that are not defined in the schema explicitly but are supported by Entity SQL.
- Constructing Types (Entity SQL)
Describes the operators used to construct Entity SQL types.
- Query Plan Caching (Entity SQL)
Describes how to cache queries, especially parameterized queries, for better query execution performance.
- Namespaces (Entity SQL)
Provides information about namespaces in Entity SQL.
- Identifiers (Entity SQL)
Provides information about identifiers in Entity SQL.
- Parameters (Entity SQL)
Provides information about parameters in Entity SQL.
- Variables (Entity SQL)
Provides information about variables in Entity SQL.
- Unsupported Expressions (Entity SQL)
Lists the Transact-SQL expressions that are not supported in Entity SQL.
- Literals (Entity SQL)
Provides information about literals in Entity SQL.
- Null Literals and Type Inference (Entity SQL)
Describes the scenarios when null literals can be used in Entity SQL without preventing type inference.
- Input Character Set (Entity SQL)
Describes the input character set Entity SQL accepts.
- Query Expressions (Entity SQL)
Provides information about query expression. It combines together many different query operators into a single syntax.
- Functions (Entity SQL)
Describes functions supported by Entity SQL.
- Operators (Entity SQL)
Describes the various Entity SQL operators.
- Paging (Entity SQL)
Describes physical paging that can be performed by using SKIP and LIIMIT sub-clauses in ORDER BY clause.
- Comparison Semantics (Entity SQL)
Describes rules for comparison of type instances.
- Composing Nested Entity SQL Queries (Entity SQL)
Describes how to compose nested queries.
- Nullable Structured Types (Entity SQL)
Describes the nullable structured types.