public void DeleteEvent(List<string> rowIds)
{
string ids = string.Format(CultureInfo.InvariantCulture, "'{0}'", string.Join("', '", rowIds.ToArray()));
string sqlCommand = string.Format(CultureInfo.InvariantCulture, "DELETE FROM {0} WHERE {1} IN ({2})", TABLE_NAME, EVENT_ID_COLUMN_NAME, ids);
SQLiteConnection connection = null;
lock (_lock)
{
using (connection = new SQLiteConnection("Data Source=" + this.DBfileFullPath + ";Version=3;"))
{
try
{
connection.Open();
using (var command = new SQLiteCommand(sqlCommand, connection))
{
command.ExecuteNonQuery();
}
}
finally
{
if (null != connection)
connection.Close();
}
}
}
}