From the course: .NET Essentials: LINQ for Databases

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Use extension methods syntax

Use extension methods syntax - .NET Tutorial

From the course: .NET Essentials: LINQ for Databases

Start my 1-month free trial

Use extension methods syntax

- [Narrator] This video, looks at the extension method syntax. We'll see how to use individual extension at the calls and look at some techniques for combining or pipelining method calls. So in this first example, we'll look at individual extension about the calls by data source is this product's DB set and online five, I am calling the order by extension method and that expects a parameters that indicates how I want to sort the information. So in my case it's a Lambda expression, saying I want to sort on the product name. When I call this query, like I'm doing online nine I get back all the products in the table and they are in alphabetical order by product name. The next query is a separate query. This time I have the same data source but now I'm calling the ware extension method. This is a filtering method. So it expects a predicate function. And my predicate is units and stock is equal to zero. And when I call this…

Contents