Chapter 9. Querying and Manipulating Data with LINQ

This chapter is about Language Integrated Query (LINQ), a set of language extensions that add the ability to work with sequences of items and then filter, sort, and project them into different outputs.

This chapter covers the following topics:

  • Writing LINQ queries
  • Working with sets
  • Projecting entities with Select
  • Sweetening the syntax with syntactic sugar
  • Using multiple threads with parallel LINQ
  • Creating your own LINQ extension methods
  • Working with LINQ to XML

Writing LINQ queries

Although we wrote a few LINQ queries in Chapter 8, Working with Databases Using the Entity Framework Core, I didn't properly explain how LINQ works.

LINQ has several parts; some are required and some are optional:

  • Extension methods ...

Get C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.