Recommendation for Book to learn Linq/Lambda RRS feed

  • Question

  • User248267340 posted

    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.

    1. Is this considered Linq, or lambda expressions?
    2. Are they the same thing?
    3. What book(s) really go through it, or a website?
    Friday, July 13, 2018 9:22 PM


All replies

  • User-821857111 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 13, 2018 9:28 PM
  • User248267340 posted

    I'll read through the MS doc, and if your book is in print, I'll get that too. Thanks Mike!


    Friday, July 13, 2018 11:07 PM
  • User-821857111 posted

    Ah. I didn't write it. I should have said: the book I used for learning LINQ was...

    Saturday, July 14, 2018 9:06 AM
  • User248267340 posted

    Yep - I looked for the book and noticed that, so I figured that's what you meant!

    Thanks so much for the suggestion, nonetheless!


    Monday, July 16, 2018 4:01 PM