I am using PredicateBuilder, which means that I am using the AsExpandable extension method. The problem is that I can no longer Trace my SQL queries as the following error is thrown when I try to cast the query to ObjectQuery so that I can do a ObjectQuery.ToTraceString() call on it...
Unable to cast object of type 'LinqKit.ExpandableQuery`1[Genesis.Person]' to type 'System.Data.Objects.ObjectQuery'.
Any Ideas?