Guy Barrette, Microsoft, Regional Director, Montreal, Canada, Visual Studio, .NET Expertise Sending the LINQ To SQL log to the debugger output window - Guy Barrette

Guy Barrette

Microsoft Regional Director, Montreal, Canada

Sending the LINQ To SQL log to the debugger output window

When coding apps that use LINQ to SQL, it is very important to check the SQL code generated to make sure that your queries are optimals.  To do this in a Console app, you simply use this code to output the query to the Console window:

ctx.Log = Console.Out;

That's nice but what if your code is in a class library project?  Wouldn't it be nice to output the query to the Output window?  Kris Vandermotten has created a small utility class to do just that.  Check it out here:
http://www.u2u.info/Blogs/Kris/Lists/Posts/Post.aspx?ID=11

Nice work!

 

 

Posted: Mar 31 2008, 08:47 AM by guybarrette | with 1 comment(s)
Filed under:

Comments

ikunal said:

how to write the sql queries in the debugger output window of asp.net application?

# June 20, 2008 7:08 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)