Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

See the SQL Generated by LINQ

, 8 Apr 2011
Or, there's always Scott Guthrie's LINQ To SQL Debug Visualizer[^].[Edit]While I'm posting links there is a nice utility that can output the generated SQL to the Debug Window in VS written by Kris Vandermotten.You can get it here[^].To use it: MyDataContext db = new...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

17 Jul 2011
Philippe Mori
LINQPad is an interesting tool to try queries.LINQPad[^]Perfect tool to try out some alternatives for complex queries. As we can see generated queries and elapsed time, it help a lot to help having fast queries for complex requests.
18 Jul 2011
AspDotNetDev
If you are the type that likes to debug production code, you can use SQL Profiler to find queries generated by your LINQ statements. This is a technique I recently used because it was so simple and did not require me to recompile anything.Note that StefanHam already posted this alternate...
26 Feb 2010
MarkLTX
3 alternatives  
When using LINQ to SQL, it can be very useful to see the SQL commands that are generated by your LINQ expressions. Sometimes the results are surprising and you might be able to improve performance by tweaking the LINQ.All you have to do is set the Log property of the DataContext object. ...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Henry Minute
Retired
United Kingdom United Kingdom
Retired Systems Admin, Programmer, Dogsbody.
Mainly on Systems for Local Government, Health Authorities,
Insurance Industry - (COBOL eeeeeeeugh).
Inventor of Synchronized Shopping.

| | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 8 Apr 2011
Article Copyright 2011 by Henry Minute
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid