Query an Entity Data Model (Application Scenarios)
The ADO.NET Entity Framework enables you to query entity data. The Entity Framework supports the following kinds of queries against entity data:
Query Type | Description |
---|---|
Language Integrated Query (LINQ) |
LINQ to Entities enables you to execute LINQ queries against entity data by using language-specific query operators. For more information, see LINQ to Entities Overview. |
Entity SQL |
Entity SQL is a storage-independent query language that is similar to SQL. Entity SQL allows you to query entity data, either as objects or in a tabular form. You should consider using Entity SQL in the following cases:
|
Query builder methods |
These methods of ObjectQuery enable you to construct queries that are the same as Entity SQL without having to construct a query string. Because these methods always return an ObjectQuery, you can build queries by calling methods in series or use them to extend an Entity SQL query. Some methods, such as Where and OrderBy, take Entity SQL fragments as parameters. Query builder methods can be followed by certain LINQ standard query operators, such as FirstOrDefault. For more information, see Query Builder Methods (Entity Framework). |
The following links are to topics relevant to this scenario. For more Entity Framework scenarios, see Application Scenarios (Entity Framework).
Entity Framework query technologies.
To write queries against entity data that return entity objects.
To control the shape of returned data.
To write queries that return projected data.
To execute queries against entity data using the EntityClient provider.
See Also
Concepts
Entity Data Model Inheritance (Application Scenarios)
Entity Framework Resources
Other Resources
Application Scenarios (Entity Framework)
Programming Guide (Entity Framework)
Sample Applications (Entity Framework)