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: 620

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

Related posts about linqpad

Related posts about dump

  • systemstate dump ??

    as seen on Oracle Blogs - Search for 'Oracle Blogs'
            ???????????????hang????,????????systemstate dump?????????,?????,????????,???????????????,????systemstate dump?????????????       ??????,????????systemstate dump, ?????“WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK”?       … >>> More

  • Heap Dump Root Classes

    as seen on Stack Overflow - Search for 'Stack Overflow'
    We have production system going into infinite loop of full gc and memory drops form 8 gigs to like 1 MB in just 2 minutes. After taking heap dump it tells me there an is an array of java.lang.Object ([Ljava.lang.Object) with millions of java.lang.String objects having same String taking 99% of heap… >>> More

  • vbscript calling svnadmin dump

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hi, Running the following vbscript to call svnadmin dump fails (i.e. no dump is being created) Set objShell = CreateObject("WScript.Shell") Set objShellExec = objShell.Exec("svnadmin dump C:\svn_repos > C:\fullbackup") I discovered from another post, http://stackoverflow.com/questions/445121/svn-dump-fails-with-wscript-shell/2400011#2400011… >>> More

  • Know more about shared pool subpool

    as seen on Oracle Blogs - Search for 'Oracle Blogs'
    ????T.askmaclean.com???Shared Pool?SubPool?????,????????_kghdsidx_count ? subpool ??subpool????( ???duration)???: SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi PL/SQL… >>> More

  • Hex Dump using LINQ (in 7 lines of code)

    as seen on ASP.net Weblogs - Search for 'ASP.net Weblogs'
    Eric White has posted an interesting LINQ query on his blog that shows how to create a Hex Dump in something like 7 lines of code.Of course, this is not production grade code, but it's another good example that demonstrates the expressiveness of LINQ.Here is the code:byte[] ba = File.ReadAllBytes("test… >>> More