Provide option to disable SQL log in LINQPad?
Options
For some statement, SQL log may very very large:
Is there any option like
foreach (var item in data)The
{
item.ProjectId = mapping[item.Project];
}
SubmitChanges();
data
may have millions rows, this will VERY impact the execution performance, so the SQL log window is causing LINQPad useless in this senario.Is there any option like
Util.PreventSQLLog = true;
to just prevent the SQL log? Comments
-
Yes:
ExecutionEngine.SqlTranslationsEnabled = false;
-
JoeAlbahari It works, thanks.
And I have a question, why it's calledSqlTransactionsEnabled
?
Sounds like it will disable the SQL Transaction(maybe this is not what I want).
or it's just prevent the SQL logging output window(with a obscure naming)? -
It's SqlTranslationsEnabled, not SqlTransactionsEnabled.
The translation of LINQ into SQL. -
Sorry, it's my fault😭