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

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