Click here to Skip to main content
15,885,546 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

How to log your LINQ query

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
20 Oct 2011CPOL 7.4K  
I prefer to use ToTraceString() on the ObjectQuery:http://msdn.microsoft.com/en-us/library/system.data.objects.objectquery.totracestring.aspx[^]It's less intrusive as I don't have to instantiate and dispose the StreamWriter and I have more control over where and how I log the resultant...
I prefer to use ToTraceString() on the ObjectQuery:

http://msdn.microsoft.com/en-us/library/system.data.objects.objectquery.totracestring.aspx[^]

It's less intrusive as I don't have to instantiate and dispose the StreamWriter and I have more control over where and how I log the resultant output.

License

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


Written By
Software Developer (Senior)
United Kingdom United Kingdom
First batch file in 1987

Messed around with the Bullfrog C++ Libraries for Syndicate in 1994

Web Developer since 2000

.net Developer since 2001

MCTS: Microsoft® .NET Framework 2.0 - Web-based Client Development

MCTS: Web Applications Development with Microsoft .NET Framework 4

Comments and Discussions

 
-- There are no messages in this forum --