I\'m using Linq to SQL. I have a DataContext against which I am .SubmitChanges()\'ing. There is an error inserting the identity field, and I\'d like to see the query it\'s u
FooDataContext dc = new FooDataContext();
StringBuilder sb = new StringBuilder();
dc.Log = new StringWriter(sb);
var result=from r in dc.Tables select d;
.....
string query=sb.ToString();