WCF translation to SQL not available?

I am typing a WCF Expression but I don't find a way in Linqpad to get the SQL Query.
For example I typed a expression Customer.Take (100) and Execute the expression.
I can see the Results, lambda, Request Log and IL tabs below the expression text window but no SQL tab.
When I go to the Request Log I can see the URL
https://url/Customer()?$top=100 and I also see a Analyze SQL option on the right.
I select open as SQL Query in New tab but I get the same URL displayed on the new tab and no SQL.
Is this supported in Linqpad or do I have to find another way to capture the SQL query that resulted from executing the WCF request?


  • edited August 2014
    My understanding is that the WCF queries are translated to a get request on the client and all the SQL is generated on the server by your data provider. I wouldn't expect the actual query to be exposed over the wire at all.

    I believe the underlying provider for WCF dataservices isn't set in stone but I'm assuming you are using entity framework. If you need to get the queries you'll likely need to get a reference to the context and use context.Database.Log to write the queries to your logging mechanism of choice.
Sign In or Register to comment.