65.9K
CodeProject is changing. Read more.
Home

How to log your LINQ query

starIconstarIconstarIconstarIconstarIcon

5.00/5 (3 votes)

Oct 20, 2011

CPOL
viewsIcon

7580

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.