From ad7afeaf7311d63ec523602106ec33d7fc5033e2 Mon Sep 17 00:00:00 2001 From: Rune Nielsen Date: Wed, 12 Jan 2022 15:29:02 +0100 Subject: [PATCH] now uses simple string concat instead of sqlbuilder (#40) --- src/MsSqlCdc/CdcDatabase.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/MsSqlCdc/CdcDatabase.cs b/src/MsSqlCdc/CdcDatabase.cs index 3a348da..fafaded 100644 --- a/src/MsSqlCdc/CdcDatabase.cs +++ b/src/MsSqlCdc/CdcDatabase.cs @@ -144,11 +144,7 @@ internal static class CdcDatabase long endLsn, string filterOption) { - var builder = new SqlCommandBuilder(); - // We have to do this here, since we cannot pass the function as command parameter. - var function = builder.UnquoteIdentifier($"{cdcFunction}_{captureInstance}"); - - var sql = $"SELECT * FROM {function}(@begin_lsn, @end_lsn, @filter_option)"; + var sql = $"SELECT * FROM {cdcFunction}_{captureInstance}(@begin_lsn, @end_lsn, @filter_option)"; using var command = new SqlCommand(sql, connection); command.Parameters.AddWithValue("@begin_lsn", beginLsn);