Last post Jul 16, 2018 04:01 PM by coreysan
Jul 13, 2018 09:22 PM|coreysan|LINK
I have some code, like this:
Products = repository.Products
.Where(p => category == null || p.Category == category)
.OrderBy(p => p.ProductId)
.Skip((productPage - 1) * PageSize)
I need to really learn this.
Jul 13, 2018 09:28 PM|Mikesdotnetting|LINK
It's LINQ, which makes use of lambda expressions. LINQ is a DSL (Domain Specific Language) for querying sequences/collections in .NET. Lambda expressions are denoted by the => operator.
My LINQ book was Linq In Action from Manning. But there are thousands of articles explaining LINQ and Lambda expressions all over the Web. Google is your friend there, but this should be your first step: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/getting-started-with-linq
Jul 13, 2018 11:07 PM|coreysan|LINK
I'll read through the MS doc, and if your book is in print, I'll get that too. Thanks Mike!
Jul 14, 2018 09:06 AM|Mikesdotnetting|LINK
Ah. I didn't write it. I should have said: the book I used for learning LINQ was...
Jul 16, 2018 04:01 PM|coreysan|LINK
Yep - I looked for the book and noticed that, so I figured that's what you meant!
Thanks so much for the suggestion, nonetheless!