ASP.NET Hosting

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.

  1. Apply filters before a join to improve query performance
  2. Filter LINQ queries using object reference comparison
  3. Apply aggregates to empty collections in LINQ to SQL queries
  4. Delay loading a property in LINQ to SQL
  5. Use table-valued functions with eager loading turned on
  6. Put joins in the correct order in a LINQ to Objects query
  7. Compose a LINQ query inside a loop

LINQ Deep Dive: Part I, Tips for Delving in to LINQ

Cross-posted from http://LinqInAction.net

No Comments