using System.Data.SqlClient;
public static void Main()
Console.WriteLine("Hello World");
query += "FROM PE_CDTB_CLIENTE_CLIE WITH(NOLOCK) ";
query += "WHERE ID_CLIE_NR_CLIENTE = @ID_CLIE_NR_CLIENTE;";
var cmd = new SqlCommand(query) { CommandType = CommandType.Text };
cmd.Parameters.AddWithValue("@ID_CLIE_NR_CLIENTE", "\"%a%\"");
Console.WriteLine(cmd.CommandText);
var resQuery = cmd.CommandText;
foreach (SqlParameter p in cmd.Parameters)
resQuery = query.Replace(p.ParameterName, p.Value.ToString());
Console.WriteLine(resQuery);