Last year, Scott Guthrie stated “You can actually override the raw SQL that LINQ to SQL uses if you want absolute control over the SQL executed”, but I can’t find documentation
You want to translate an expression tree into SQL... You need to implement your own IQueryProvider
IQueryProvider Reference
How To
MSDN How To
DataContext x = new DataContext
Something like this perhaps?
var a = x.Where().with()
...etc
It lets you have a much finer control over the SQL.
The ability to change the underlying provider and thus modify the SQL did not make the final cut in LINQ to SQL.
Matt Warren's blog has everything you need for that:
http://blogs.msdn.com/mattwar/