I have code that executes a query in sqlserver accessing with dapper in the error exception I want to get the query executed with the specified parameter:
StringBuilder sql = new StringBuilder();
sql.AppendLine(" SELECT " + campoChave + " AS CODIGO, ");
sql.AppendLine(" " + campoSelecao + " AS DESCRICAO ");
sql.AppendLine(" FROM " + tabela);
sql.AppendLine(" where codigoidioma = @codigoIdioma");
sql.AppendLine(" ORDER BY " + campoSelecao);
IEnumerable entities2 = conexao.Query<ComboBoxGenerico>(sql.ToString(), new { codigoIdioma = 1 });
this code is with error I want to get the query after executing the dapper with the command
Ex: select teste as codigo ..... where codigoidioma = 1
@codigoIdioma ---> 1