You can see the SQL statement using the toString () statement.
var customers = from cust in Customers
select cust;
Console.WriteLine(customers.ToString());
or you can do something like this.
DataContext context = new DataContext(...);
StringWriter writer = new StringWriter();
context.Log = writer;
var customers = from cust in Customers
select cust;
Console.WriteLine(writer.ToString());
source
share