From the course: .NET Essentials: Working with LINQ
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
The select clause - .NET Tutorial
From the course: .NET Essentials: Working with LINQ
The select clause
- [Narrator] One of the rules of a query expression is that you must end your query expression with either a select or a group clause. What's the difference between the two? Well, a select returns a sequence of the chosen type. For example, it could be an Ienumerable<string>, or an IOrderedEnumerable<product>. Whereas a group returns a sequence but this time it's a sequence of groups, and those groups are organized by a key that you specify. We will discuss groups in more detail later in the course. We'll look at select, in this video and some of the other videos in this chapter. I'd like to show you a new data source that we're going to use going forward. It's more complete or more complex than the simple list of strings we've been using. Let's look here in the DLL source. What I have done is created a new data source. That's inside a .Net assembly DLL. We're going to look at the Visual Studio code in just a minute,…
Contents
-
-
-
-
-
-
-
-
The three types of query expressions2m 16s
-
(Locked)
Review query expression clauses4m 45s
-
(Locked)
Examples of three query expressions3m 16s
-
(Locked)
The select clause6m 26s
-
(Locked)
Learn how to use select to project into another type2m 41s
-
(Locked)
Select into anonymous type2m 16s
-
(Locked)
Learn how to use expressions with select2m 15s
-
(Locked)
Challenge: Write select expressions1m 28s
-
(Locked)
Solution: Write select expressions1m 27s
-
(Locked)
Index into another sequence2m 58s
-
-
-
-
-
-
-
-
-
-