in Education by
On many sites/blogs I noticed that people, who want to explain linq mechanism, write Linq Queries and provide SQL translation for that. How can I get the translation for my own queries? I'm working with EF .Net 4.0 in VS2010. Is there a place (property or even some third-party tool) where I can see what they're being translated into? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You can use the ObjectQuery.ToTraceString method: var query = ... string sql = ((System.Data.Objects.ObjectQuery)query).ToTraceString(); However, some shortcomings of this approach is that it will only show queries, not updates/inserts/deletes. Also, it won't reveal the parameters used. If you need as much detail as possible from the query then use the SQL Server Profiler as Neil suggested. Julie Lerman has a good article with different options on MSDN: Profiling Database Activity in the Entity Framework. She mentions: ObjectQuery.ToTraceString method Visual Studio 2010 Ultimate's IntelliTrace EFTracingProvider

Related questions

0 votes
    I switched from Perl to Python about a year ago and haven't looked back. There is only one idiom ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I switched from Perl to Python about a year ago and haven't looked back. There is only one idiom ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    I have been having some issues with LINQ-To-SQL around memory usage. I'm using it in a Windows ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I have been having some issues with LINQ-To-SQL around memory usage. I'm using it in a Windows ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I have been having some issues with LINQ-To-SQL around memory usage. I'm using it in a Windows ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    This is a simple sort of crosstab query. I am having difficulty transferring my SQL knowledge to Linq and ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    Slightly unimportant but it's piqued my curiousity. I've just logged into an Oracle 10g database for the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    Slightly unimportant but it's piqued my curiousity. I've just logged into an Oracle 10g database for the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    Slightly unimportant but it's piqued my curiousity. I've just logged into an Oracle 10g database for the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Last year, Scott Guthrie stated You can actually override the raw SQL that LINQ to SQL uses if you ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    We've just started using LINQ to SQL at work for our DAL & we haven't really come up with a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    We've just started using LINQ to SQL at work for our DAL & we haven't really come up with a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 7, 2022 in Education by JackTerrance
0 votes
    We've just started using LINQ to SQL at work for our DAL & we haven't really come up with a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 6, 2022 in Education by JackTerrance
0 votes
    Kafka streams does not support interactive queries to unify the worlds of streams and databases. (1)True (2)False...
asked Jun 16, 2021 in Technology by JackTerrance
...