Entity Framework - SPLessons

Entity Framework Querying

Home > Lesson > Chapter 7
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Entity Framework Querying

Entity Framework Querying

shape Description

There are different types of Queries supported by Entity Framework. All these query types are converted into SQL.

LINQ to Entity

shape Description

LINQ means Language Integrated Query. LINQ is one of the tools which is used to query the data from the database. LINQ to Entity means LINQ is used in Entities to access the data from the database. Both the syntax uses using() method to initialize an object. If the Object scope going to expire then the dispose() method will be automatically called.

shape Example

See the below Normal SQL Query. [sql]select * from Name.Employee where DepartmentId=1[/sql] Query Expression for above SQL Query. [sql]from e in employee where e.DepartmentId=1 select e[/sql] Method Syntax for the above SQL Query. [sql]employee.where(e=>e.DepartmentId==1)[/sql]

Entity SQL

shape Description

Entity SQL is also one of the types of tools in the Entity Framework which is used to query the data. Entity SQL totally works by Object Services.

Native SQL

shape Description

Native SQL is similar to the normal SQL.