public void RemoveBoardGameFromBoardGameList(BoardGame oldBoardGame, OracleConnection connection) { try { OracleCommand command = connection.CreateCommand(); command.CommandText = String.Format(QRY_DELETE_BOARDGAME, oldBoardGame.Id, _id); connection.Open(); command.ExecuteNonQuery(); _boardGameList.Remove(oldBoardGame); } catch (OracleException e) { throw e; } finally { connection.Close(); } }
public void AddBoardGameToBoardGameList(BoardGame newBoardGame, OracleConnection connection) { try { OracleCommand command = connection.CreateCommand(); command.CommandText = String.Format(QRY_INSERT_BOARDGAME, newBoardGame.Id, _id); connection.Open(); command.ExecuteNonQuery(); _boardGameList.Add(newBoardGame); } catch (OracleException e) { throw e; } finally { connection.Close(); } }