Linq DataContext Logging with the Logging Application Block

Thursday, June 5th, 2008

The System.Data.Linq.DataContext class exposes a TextWriter as the Log property allowing you to monitor the SQL that's getting executed under the covers. The trivial usage of this is to simply set the property to Console.Out and watch the results. Given that I was adding the Enterprise Library 4.0 Logging Block to ...

Dependency Injection with Unity and Linq to SQL DataContexts

Tuesday, June 3rd, 2008

I've spent a few hours in the last couple of days playing around with ASP.NET MVC, Linq to SQL and now the Unity dependency injection (DI) container. Basically I wanted to start putting together a little N-tier application using the latest and greatest new stuff. I also got to use ...