Meaning, with the IQueryable interface and the IQueryable
interface you get an object that can evaluate queries. The IQueryable interface is based on expressions.
One of the main differences between IEnumerable and IQueryable is that the IEnumerable interface provides
forward-only iteration. It does not have the ability to move between items (except forward). With
IQueryable however, you have much more flexibility with your query operations. Remember, though
that the IQueryable interface implements IEnumerable, which provides IQueryable with iteration
capability.
There are two types of query operators. The first type operates on IEnumerable objects, while the other
operates on IQueryable objects. Each set of operators is implemented as static methods on the corresponding
types, meaning that the operators can be called using static method syntax as well as being
called as instance methods.
A lot of what makes this possible is the new features found in C# 3.0 and VB 9.0. Those features
include lambda expressions (a concise expression or statement block) and extension methods
(static methods associated with a type).
Pages:
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121