Skip to content

Instantly share code, notes, and snippets.

@mk3008
Created August 15, 2014 13:17
Show Gist options
  • Select an option

  • Save mk3008/6535fd9156dcd2b90099 to your computer and use it in GitHub Desktop.

Select an option

Save mk3008/6535fd9156dcd2b90099 to your computer and use it in GitHub Desktop.
Dim dic As New Dictionary(Of String, Object)
dic.Add("age", {20, 21, 22, 30, 31, 32, 40, 41, 42})
Dim cmd As IDbCommand = DynamicSqlParser.CreateDbCommand(cn, My.Resources.InSql, "@", dic)
SELECT
*
FROM
Employees
WHERE
Age IN /*ds age*/(20,21,22)
SELECT
*
FROM
Employees
WHERE
Age IN (@age_0, @age_1, @age_2, @age_3, @age_4, @age_5, @age_6, @age_7, @age_8)
--age_0=20, age_1=21, age_2=22, age_3=30, age_4=31, age_5=32, age_6=40, age_7=41, age_8=42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment