How to diagnose Linq to SQL easily and production-ready

Here's what we're currently doing: we add an InitializeContext method to all DataContext-derived classes, which is called from all ctors:

    private void InitializeContext()
    {
#if DEBUG
        if (Debugger.IsAttached)
        {
            this.Log = new DebuggerTextWriter();
        }
#endif
    ...

Read full article

Published 22 August 2008 09:08 PM by Daniel Cazzulino
Filed under: ,

Comments

No Comments

Search

Go

This Blog

News

     

      Microsoft MVP Profile

Syndication