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

Query results

Okay, we know how to write a basic LINQ query, and we know when that query gets executed. But what exactly does “executed” mean in this context? What is the query returning? So far we’ve been using var or Dim to type our variables implicitly, but you need to know what you’re working with, right? Well, it depends on the query...

If your query includes a method that returns an aggregate value,  the return type will be the type returned by that value:

Image

If your query includes a method that returns a single entity, the return type will be that entity:

If your query returns a set of data, it will be in the form of an IQueryable<TEntity> ...

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