I am trying to do run a bulk deletion using parameterized queries. Currently, I have the following code:
pendingDeletions = new SQLiteCommand(@"DELETE FROM [centres] WHERE [name] = $name", conn);
foreach (string name in selected)
pendingDeletions.Parameters.AddWithValue("$name", name);
pendingDeletions.ExecuteNonQuery();
However, the value of the parameter seems to be overwritten each time and I end up just removing the last centre. What is the correct way to execute a parameterized query with a list of values?