LINQ Deep Dive: great LINQ tips
Zeeshan Hirani who already offered us a 500-page Entity Framework learning guide, now publishes great LINQ tips in the first part of his LINQ Deep Dive articles. These tips are not the usual introductions to LINQ features you can find elsewhere. You can tell that they come from someone who lives in the trenches. I learnt very interesting features and best practices I didn't know about.
- Apply filters before a join to improve query performance
- Filter LINQ queries using object reference comparison
- Apply aggregates to empty collections in LINQ to SQL queries
- Delay loading a property in LINQ to SQL
- Use table-valued functions with eager loading turned on
- Put joins in the correct order in a LINQ to Objects query
- Compose a LINQ query inside a loop
LINQ Deep Dive: Part I, Tips for Delving in to LINQ
Cross-posted from http://LinqInAction.net