I've stumbled across a LINQ to SQL extension called PLINQO freely downloadable at http://plinqo.com/ and includes source code.
PLINQO is a set of CodeSmith templates that generates code for you around your LINQ to SQL DBML file. It generates Manager classes and Query classes automatically (it does this by looking at your primary keys, indexes and foreign key constraints).
You must buy CodeSmith, which is the template engine, but PLINQO is free.
Its actually quite amazing and saves you tons of time and energy creating boiler plate code. So glad I found it, now I want you to investigate it too. Go check out the video tutorials to see what I mean. Awesome.