O'Reilly logo

Fluent Entity Framework by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What is a query, exactly?

Before we start looking at the various ways you can write queries against your model, let’s take a minute to explore exactly how this whole query stuff works. We’ll start by looking at a code construct that works in a similar way: .NET delegates:

Although the details vary depending on the language and UI platform you choose, the basic delegate pattern is always the same in .NET:

Image

When you’re working with queries, the details will vary depending on the language (LINQ or Entity SQL) and Entity Framework API you’re using (ObjectContext or DbContext), but the basic pattern is the same:

The query variable defines the data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required