IQueryable
The IQueryable interface allows the objects
to be queried based on the LINQ-to-SQL. Objects which implement the IQuerieable
interface can be further queried using LINQ queries and these additional
queries will be executed on the underlying data source.
The below line first queries the list of employees from the datasource, the resultant object empList is further queried based on the department name of the employee, both the filters are done in the underlying datasource and only the final list of employees belonging to the sales department are returned and stored in the memory, using LINQ-to-Sql. Hence more efficient based on IEnumerable based objects.
The IQueryable
The below line first queries the list of employees from the datasource, the resultant object empList is further queried based on the department name of the employee, both the filters are done in the underlying datasource and only the final list of employees belonging to the sales department are returned and stored in the memory, using LINQ-to-Sql. Hence more efficient based on

