private void DeletePasswordFile(int id) { var query = $"Delete From {_tableName} Where UserId = @userId"; var cmd = new SqlCommand(query, _connector.GetConnectionObject()); cmd.Parameters.AddWithValue("@userId", id); _connector.ExecuteSqlStatement(cmd); }
public void EditEntry(int id, Passwords newValues) { var query = UpdateQueryStatement(); var cmd = new SqlCommand(query, _connector.GetConnectionObject()); cmd = InsertPasswordValuesIntoCommandObject(newValues, cmd); cmd.Parameters.AddWithValue("@id", id); _connector.ExecuteSqlStatement(cmd); }