LINQ in Action roller

Using ASP.NET Page Trace to View LINQ SQL

For debugging and performance tuning reasons I wanted to output the SQL LINQ generates to ASP.NET's Page Trace. With help from a few other blog posts I was able to create a small TextWriter class that could be used for this purpose. Code Snippet using System; using System.Web; public class TraceTextWriter : System.IO.TextWriter { public override System.Text.Encoding Encoding { get { throw new NotImplementedException(); } } public override void WriteLine(string value) { HttpContext.Current.Trace.Write("LINQ", Read More...
Published Tuesday, April 22, 2008 10:13 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication