Is there any way to get resulting sql query?
(at the moment of DataContext.SubmitChanges() execution, for example)
Resulting sql
You can get the queries executed in the context using its Log property:
Code: Select all
DataContext1.DataContext1 ctx = new DataContext1.DataContext1();
StringBuilder sb = new StringBuilder();
ctx.Log = new StringWriter(sb);