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 85 | Next

Scott Klein

"Professional LINQ"

In C# using AND (&&)
looks like the following:
where c.FirstName.StartsWith("S")
&& c.LastName.StartsWith("A")
In Visual Basic, it looks like this:
Where c.FirstName.StartsWith("S")
AND c.LastName.StartsWith("A")
The OR (||) operator works the same way:
where c.FirstName.StartsWith("S")
|| c.LastName.StartsWith("A")
And in Visual Basic:
Where c.FirstName.StartsWith("S")
OR c.LastName.StartsWith("A")
The where clause is optional when writing a LINQ query, as is the orderby clause. The orderby clause
provides the capability to order (sort) the results returned by the execution of the query. The following
sorts the results by last name:
orderby c.LastName
By default, the sort is applied in ascending order. To reverse the sort (descending order), simply apply
the descending clause:
orderby c.LastName descending
You can sort by more than one property:
orderby c.LastName, c.FirstName
In Visual Basic, the orderby clause reads:
Order By c.LastName Descending
You can also group the results of the query based on one of the properties of the query.


Pages:
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6