You are talking about the Dynamic LINQ library.
If you have VS 2008 installed, you can find the detailed API document in
<path to vs2008>\Samples\1033\CSharpSamples\LinqSamples\DynamicQuery\Dynamic Expressions.html
Or download here
Here 's a Scott Gug article on dynamic LINQ
Here is an excerpt from the Dynamic Expressions.html file.
Current instance
When analyzing a lambda expression with one single parameter, the members of an unnamed parameter automatically enter the scope in the expression string, and the current instance specified by the unnamed parameter can generally refer to the it keyword. For instance,
customers.Where("Country = @0", country);
equivalently
customers.Where("it.Country = @0", country);
The IQueryable extension methods all parse their expression arguments as lambda expressions with a single unnamed parameter.
Dynamic lambda call
An expression can refer to other dynamic lambda expressions through dynamic lambda calls. A dynamic lambda call consists of a lookup variable identifier that references an instance of System.Linq.Expressions.LambdaExpression, followed by a list of arguments. The arguments given should be compatible with the parameter list of this dynamic lambda expression.
Next, we analyze two separate dynamic lambda expressions, and then combine them into a predicate expression using dynamic lambda calls:
Expression<Func<Customer, bool>> e1 = DynamicExpression.ParseLambda<Customer, bool>("City = \"London\""); Expression<Func<Customer, bool>> e2 = DynamicExpression.ParseLambda<Customer, bool>("Orders.Count >= 10"); IQueryable<Customer> query = db.Customers.Where("@0(it) and @1(it)", e1, e2);
Of course, you can combine static and dynamic lambda expressions this way:
Expression<Func<Customer, bool>> e1 = c => c.City == "London"; Expression<Func<Customer, bool>> e2 = DynamicExpression.ParseLambda<Customer, bool>("Orders.Count >= 10"); IQueryable<Customer> query = db.Customers.Where("@0(it) and @1(it)", e1, e2);
The above examples have the same effect as:
IQueryable<Customer> query = db.Customers.Where(c => c.City == "London" && c.Orders.Count >= 10);