Chapter 5. Querying

In this chapter, we will cover the following topics:

  • Executing client-side functions in LINQ queries
  • Mixing SQL with LINQ queries
  • Getting entities from the local cache
  • Creating filtered collections
  • Creating reusable queries
  • Querying on shadow properties
  • Implementing the query object pattern
  • Using Dynamic LINQ

Introduction

This chapter will be all about getting data from a database using Entity Framework Core. We will explore what Entity Framework Core has to offer, including features not commonly found in other ORMs, such as the ability to mix LINQ with SQL and the usage of shadow properties.

Granted, querying is probably the most common activity you do with an Object-Relational tool such as Entity Framework, or, for that matter, with ...

Get Entity Framework Core Cookbook - 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.