Appendix. A brief introduction to LINQ

This appendix is for anyone who is new to Microsoft’s Language Integrated Query (LINQ) feature or anyone who wants a quick recap of how LINQ works. The LINQ language bridges the gap between the world of objects and the world of data, and is used by EF Core to build database queries. Understanding the LINQ language is key to using EF Core to access a database.

This appendix starts with the two syntaxes you can use to write LINQ code. You’ll also learn the types of commands available in LINQ, with examples of how those commands can manipulate collections of in-memory data.

Then you’ll explore the related .NET type IQueryable<T>, which holds LINQ code in a form that can be executed later. This type allows ...

Get Entity Framework Core in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.