Print Page | Close Window

Feature request - support ToTraceString() on a per-query basis

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2793
Printed Date: 14-May-2026 at 1:38am


Topic: Feature request - support ToTraceString() on a per-query basis
Posted By: pk55
Subject: Feature request - support ToTraceString() on a per-query basis
Date Posted: 23-Jun-2011 at 6:56pm

According to this post,

http://www.ideablade.com/forum/forum_posts.asp?TID=2339&KW=ToTraceString&PID=9720&title=using-max-and-min#9720 - http://www.ideablade.com/forum/forum_posts.asp?TID=2339&KW=ToTraceString&PID=9720&title=using-max-and-min#9720
 
Tracing of queries within DevForce can only be done for all queries or limited to those for a specific EdmKey.  Afraid there's no way to convert a DevForce EntityQuery into an EF ObjectQuery, and the ToTraceString method is not supported on EntityQuery.
 
Ideally, I'd love to be able to do exactly that; cast an EntityQuery to an EF ObjectQuery just to get the sql to be executed  by calling that method but absent that, isn't there some way you could return the ToTraceString results back after execution of an EntityQuery? Maybe as an option on the query execution? I'm also only interested in this when running a query on the server (sync queries against the datasource).
 
This isn't a request to aid in debugging.  For that, I use SQL profiler or LinqPad to see the SQL that a query generates (I have an EF project that generates the domain model that can be used by LinqPad) but I actually need the generated SQL  at runtime from our DevForce Domain models on the server from dynamic queries with dynamic predicate descriptions.
 
Any chance this could happen?  And if by some chance it can, when might that be?



Print Page | Close Window