Yes that is one option.
If I have an insert query with say 5 parameters I can writeLine each of the params after I load them into the parameter.
My question is: Is there a way to WriteLine the SQL itself and see the values in the SQL statement? When you do WriteLine on a parameterized SQL statement you see something like:
INSERT into tbl (a,b,c) Values (@a,@b,@c)
Where the @ is the parameter. Regardless of what value you set it to you are always going to see the parameter listed as that.
But isnt the value of the parameter being swapped into that statement before it gets sent to sql? Why couldnt I see the SQL at that point? Then my 5 lines of WriteLine @a, WriteLine @b .... would be replaced by
WriteLine(command.RealCommandText)