While trying to work through various problems in LINQ that I could easily solve in T-SQL, I found a sample at code.msdn.microsoft.com (I hadn’t seen that sight before, but seems like a potential gold mine). It is called 101 LINQ Samples and at the time of this writing is the 3rd most popular download on the site. Looking forward to digging into it. Here’s the link to the main page with downloads.
Here are the individual links/list of topics:
Restriction Operators
Projection Operators
- Select – Simple 1
- Select – Simple 2
- Select – Transformation
- Select – Anonymous Types 1
- Select – Anonymous Types 2
- Select – Anonymous Types 3
- Select – Indexed
- Select – Filtered
- SelectMany – Compound from 1
- SelectMany – Compound from 2
- SelectMany – Compound from 3
- SelectMany – from Assignment
- SelectMany – Multiple from
- SelectMany – Indexed
Partitioning Operators
- Take – Simple
- Take – Nested
- Skip – Simple
- Skip – Nested
- TakeWhile – Simple
- TakeWhile – Indexed
- SkipWhile – Simple
- SkipWhile – Indexed
Ordering Operators
- OrderBy – Simple 1
- OrderBy – Simple 2
- OrderBy – Simple 3
- OrderBy – Comparer
- OrderByDescending – Simple 1
- OrderByDescending – Simple 2
- OrderByDescending – Comparer
- ThenBy – Simple
- ThenBy – Comparer
- ThenByDescending – Simple
- ThenByDescending – Comparer
- Reverse
Grouping Operators
- GroupBy – Simple 1
- GroupBy – Simple 2
- GroupBy – Simple 3
- GroupBy – Nested
- GroupBy – Comparer
- GroupBy – Comparer, Mapped
Set Operators
Conversion Operators
Element Operators
Generation Operators
Quantifiers
Aggregate Operators
- Count – Simple
- Count – Conditional
- Count – Nested
- Count – Grouped
- Sum – Simple
- Sum – Projection
- Sum – Grouped
- Min – Simple
- Min – Projection
- Min – Grouped
- Min – Elements
- Max – Simple
- Max – Projection
- Max – Grouped
- Max – Elements
- Average – Simple
- Average – Projection
- Average – Grouped
- Aggregate – Simple
- Aggregate – Seed


February 14th, 2012
Posted in
Tags: 