I'm having list of ids and I want to update the database table. I'm doing something like this:
sql = "update table set col = 'something' where id in (@Ids)"
using (var connection = new SqlConnection(_connection)){
connection.Query(sql, new { Ids = ids});
}
The error is:
System.Data.SqlClient.SqlException: 'Incorrect syntax near ','.'