August 2015
Beginner
1075 pages
40h 42m
English
The real power of EF is the ability to perform SQL-like operations against a set of objects (for example, the objects you have defined in your entity data model) using a variety of different methods.
Because every object in EF is LINQ enabled, we could use LINQ to Entities to query for a list of salaried employees, like this.
using (AdventureWorksEntities entities = new AdventureWorksEntities()) { List<Employee> employees = (from e in entities.Employees where e.SalariedFlag == true select e).ToList(); }
The AdventureWorksEntities object seen on the first line of code above represents our conceptual model; LINQ provides the syntax we need to iterate ...
Read now
Unlock full access