ServiceStack/ServiceStack.OrmLite — pull request #105 by danbarua (2012-10-25 11:01:36+00:00)
Title: Implemented And/Or for ExpressionVisitor (Issue #93)

Allows chaining predicates together, useful when constructing queries based on a specification object.

var visitor = ReadExtensions.CreateExpression();
visitor.Where(x => x.FirstName.StartsWith("Jim")).And(x => x.LastName.StartsWith("Hen"));
var results = db.Select(visitor);
Assert.AreEqual(1,results.Count);

visitor.Where(x => x.Age < 30).Or(x => x.Age > 45);
results = db.Select(visitor);
Assert.AreEqual(5, results.Count);
Assert.IsFalse(results.Any(x => x.FirstName == "Elvis"));