HOW TO: Compose Dynamic LINQ Queries
Solution
LINQ TO SQL Dynamic Queries
by Chris Rock (Rocks Thoughts)
Part 2:
LINQ TO SQL Dynamic Queries #2 (Or statements)
Part 3:
LINQ TO SQL Dynamic Queries #3 (And's and Or's Together)
Dynamically Composing Expression Predicates
by Joseph Albahari (C# 3.0 in a Nutshell) - showcases the use of type-safe LINQ to SQL extension methods (part of LINQKit) to compose dynamic LINQ expressions.
Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library)
by Scott Guthrie - explains how to use the LINQ Dynamic Query Library to build string-based dynamic LINQ expressions.
Related Resources
LINQKit
- free library for composing dynamic LINQ queries
VB Dynamic Query Library (included in the \Language Samples\LINQ Samples\DynamicQuery directory)
C# Dynamic Query Library (included in the \LinqSamples\DynamicQuery directory)