20 August 2012, by Matthew Richards
When I was first starting out with LINQ, the method I had most trouble getting my head round was GroupBy. So I wanted to finish this series of posts with a quick how-to on grouping, in case others find the same problem.
In SQL, GROUP BY seems so straightforward. Somehow in LINQ it seems to contrive to cause problems though. But it’s easy when you know how.
13 August 2012, by Matthew Richards
Having discussed how to take advantage of lazy evaluation in LINQ, it only seems right to discuss some of the surprises this might cause you. I’ve picked out a few examples from my own experience of where understanding what’s going on behind the scenes is important to avoid falling into a trap.
6 August 2012, by Matthew Richards
This post looks at one reasonably important aspect of how LINQ works under the hood – lazy evaluation.
30 July 2012, by Matthew Richards
Using LINQ to simplify your code
LINQ is all about manipulating data. But actually, so is a remarkably large amount of programming. We’ve already looked at some things you can do with your list of beers using LINQ, but actually if you go back to the example I used to introduce generics, that’s all about manipulating data too:
23 July 2012, by Matthew Richards
This series of posts is about Language Integrated Query (LINQ, pronounced “link”) – a set of libraries providing a means of querying data in C#. It is intended very much as a beginner’s guide, although those who have a basic knowledge of LINQ but don’t have a full understanding of its principles might still find some points of interest.
16 July 2012, by Matthew Richards
Over the next few weeks I’ll be publishing a short series of posts introducing Language Integrated Query (LINQ). However to use LINQ well it’s important to have a basic understanding of Generics, so my first post covers this topic. For nostalgia value, I’ve included a little bit of history from the heady days of .NET 1.1, and some advice for anyone who’s coming back to .NET programming having not used it since those days.
10 February 2012, by Dan Corder
A common problem with LINQ to Entities is that it can often lead to code repetition. This post explains why and when this happens, and how to get around it using LinqKit.