Generated SQL with PredicateBuilder, LINQPad and operator ANY
        Posted  
        
            by Sig. Tolleranza
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Sig. Tolleranza
        
        
        
        Published on 2010-03-26T09:11:31Z
        Indexed on 
            2010/03/26
            9:13 UTC
        
        
        Read the original article
        Hit count: 691
        
I previously asked a question about chaining conditions in Linq To Entities. Now I use LinqKit and everything works fine. I want to see the generated SQL and after reading this answer, I use LinqPad.
This is my statement:
var predProduct = PredicateBuilder.True<Product>();
var predColorLanguage = PredicateBuilder.True<ColorLanguage>();
predProduct = predProduct.And(p => p.IsComplete);
predColorLanguage = predColorLanguage.And(c => c.IdColorEntity.Products.AsQueryable().Any(expr));
ColorLanguages.Where(predColorLanguage).Dump();
The code works in VS2008, compile and produce the correct result set, but in LinqPad, I've the following error:
NotSupportedException: The overload query operator 'Any' used is not Supported.
How can I see the generated SQL if LINQPad fails?
© Stack Overflow or respective owner