Grouping in LINQ enables you to return partitioned sets of data from a collection based on a given key value. An example might be to group all Contact records by the State property. In LINQ this query can be simply written
var q = from c in contacts
group c by c.State;
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.