Пример #1
0
        // The bulk of the clean-up code is implemented in Dispose(bool)
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // free managed resources
                _dbConnection.Close();

                _dbConnection.Dispose();
            }
            // free native resources here if there are any
        }
Пример #2
0
        // The bulk of the clean-up code is implemented in Dispose(bool)
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                lock (_dbConnection)
                {
                    _dbConnection.Close();

                    _dbConnection.Dispose();
                }
            }
            // free native resources here if there are any
        }
Пример #3
0
 public void Dispose()
 {
     db.Dispose();
 }
Пример #4
0
        //public int ExecuteNonQuery(string cmdText, CommandType cmdType, SqlParameter[] param)
        //{
        //    // TODO:  Add DBConnection.ExecuteNonQuery implementation
        //    return con.ExecuteNonQuery(cmdText, cmdType, param);
        //}

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            // TODO:  Add DBConnection.Dispose implementation
            con.Dispose();
        }