ways of querying entity data model
We can query the Entity Data Model in the following ways.
LINQ to Entities
Using methods - LINQ methods
Using methods - Entity framework's ObjectQuery class
Querying using EntityFramework's EntityClient API
All the queries created using the above mentioned ways are executed by the EntityFramework. The EntityFramework converts the Entity Data Model query into a query, which the database can process.
For instance if you are using sql server database in your ERP application, the queries are converted to sql server queries. Then the database will execute the query and return the results. These results are converted into objects by the Entity Framework depending on the entities created in the Entity Data Model.
Note that we can create queries against the EDM after created Entity Data Model, discussed in the previous article. You will observe that the method of writing queries against data model and database are different.