Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
            }
        }