SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 95 | Next

Scott Klein

"Professional LINQ"

An ADO.NET
command object contains a property that holds a string that describes the query. The IQueryable
object is similar in that it contains a description of a query that is encoded as a data structure known
as an expression.
42
Chapter 3: LINQ Queries
The command object has an ExecuteReader() method that causes execution. The results are returned as
a DataReader. Likewise, the IQueryable object has a GetEnumerator method that causes the execution of
the query. The results of the query are returned as an IEnumerator.
Query Syntax versus Method Syntax
LINQ provides the ability to write queries using both query syntax and method syntax, and most
of the examples until now have used query syntax, which is writing the query as a query expression,
like this:
IEnumerable query =
from c in contact
where c.FirstName.StartsWith("S")
select c;
This declarative syntax is easy to read and understand, but you also have the option of writing your
queries using method syntax. When a LINQ query is compiled, the query expression is translated into
method syntax because the .


Pages:
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6