From b5d8360ff3baa3ba02aca93d799cbe94af8e400c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stef=C3=A1n=20J=C3=B6kull=20Sigur=C3=B0arson?= Date: Fri, 4 Oct 2019 23:33:56 +0000 Subject: [PATCH] Removing filtering of SQL Command text for non-stored procs when sending the BeginExecute event. (#242) --- .../netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs index 734b37fd63..6c38b54be9 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs @@ -7464,8 +7464,7 @@ private void WriteBeginExecuteEvent() { if (SqlEventSource.Log.IsEnabled() && Connection != null) { - string commandText = CommandType == CommandType.StoredProcedure ? CommandText : string.Empty; - SqlEventSource.Log.BeginExecute(GetHashCode(), Connection.DataSource, Connection.Database, commandText); + SqlEventSource.Log.BeginExecute(GetHashCode(), Connection.DataSource, Connection.Database, CommandText); } }