// 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 }
// 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 }
public void Dispose() { db.Dispose(); }
//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(); }