BitSpire
Free eBook · C# / LINQ

LINQ, explained with sketches

LINQ is everywhere in C# - and quietly misunderstood. When does a query actually run? Why does the same collection get enumerated twice? This eBook draws the answers: the mental models behind LINQ, sketched so they stick.

  • See deferred execution for what it is - why nothing runs until you enumerate, sketched step by step.
  • Tell IEnumerable and IQueryable apart - and know where your query really executes: in memory or at the database.
  • Avoid the classic traps: multiple enumeration, hidden allocations and when to materialise with ToList/ToArray.

.NET experts from Switzerland · Microsoft MVP & open-source contributors · sketches over jargon

The eBook is available in English only.

Get the free eBook

Instant download - no email or sign-up required.

Download the eBook

Shall we get in touch?

No newsletter, no ads. We'd like a personal, one-to-one conversation about your projects, your challenges, and whether we could work together.

We never share your data. More in our imprint & privacy notice

Inside the eBook

What's inside the eBook

From deferred execution and the IEnumerable/IQueryable split to multiple enumeration and materialisation - each idea as a sketch you'll remember.

Sketch-based · quick read
Preview page from the eBook: the Where and Take operators, each shown as a before/after sketch with a short C# example
A peek inside the eBook
  1. Deferred execution

    Why nothing runs yet

  2. IEnumerable vs. IQueryable

    In memory or at the DB

  3. Streaming vs. buffering

    Where/Select vs. OrderBy

  4. Multiple enumeration

    The hidden re-run

  5. Materialisation

    ToList / ToArray / ToDictionary

  6. Query vs. method syntax

    Two ways, one meaning

Why BitSpire

We write C# every day - and love making it click.

We're .NET experts from Switzerland, including a Microsoft MVP and open-source contributors. From advising CTOs to running .NET workshops: we love code - and even more, explaining it so a whole team levels up.

Deferred execution

Sketch

A query is a recipe, not a result. See exactly when it runs - and why that single idea explains most LINQ surprises.

Multiple enumeration

Sketch

The same IEnumerable, enumerated twice, quietly does the work twice. Spot it in a sketch and you stop writing the bug.

IEnumerable vs. IQueryable

Sketch

One runs in your process, the other translates to SQL. Knowing which is which is the difference between fast and accidentally-O(n).

An eBook won't turn LINQ into magic. But the right mental model turns "it just works" into "I know exactly why" - and stops a class of subtle bugs before they ship.

Ready to make LINQ click?

Grab the eBook and get the mental models behind LINQ - sketched so they stay with you.

Download the eBook

Prefer to write to us directly?

Let's Build Something Great Together

Have a question or want to discuss a project? We'd love to hear from you. Fill out the form below and we'll get back to you as soon as possible.

125 / 2000
or

You can also reach us directly at [email protected]