You should be able to use CompositePredicateDescription
in this situation without problems. How is it not working?
Here's an example:
PredicateDescription p1 = PredicateBuilder.Make(typeof(Product), "UnitPrice", FilterOperator.IsGreaterThanOrEqualTo, 24);
PredicateDescription p2 = PredicateBuilder.Make(typeof(Product), "Discontinued", FilterOperator.IsEqualTo, true);
CompositePredicateDescription p3 = p1.And(p2);
PredicateDescription p4 = PredicateBuilder.Make(typeof(Product), "UnitsInStock", FilterOperator.IsGreaterThanOrEqualTo, 1);
PredicateDescription p5 = PredicateBuilder.Make(typeof(Product), "UnitsOnOrder", FilterOperator.IsGreaterThanOrEqualTo, 1);
CompositePredicateDescription p6 = p1.And(p2);
CompositePredicateDescription p7 = p3.Or(p6);
var query = mgr.Products.Where(p7);
The code above will generate the WHERE statement below (from SQL Profiler) which has the same pattern as the WHERE statement in your query:
WHERE (([Extent1].[UnitPrice] >= cast(24 as decimal(18))) AND (1 = [Extent1].[Discontinued])) OR (([Extent1].[UnitPrice] >= cast(24 as decimal(18))) AND (1 = [Extent1].[Discontinued]))
If you haven't done so already, you might want to take a look at the DevForce Resource Center article on dynamic WHERE clauses.