public void Execute() { IDBConnector db = null; try { db = DBConnector.Initialize(); db.Open(); _actionDB(db); } catch (Exception ex) { if (OnError != null) { OnError(ex); } } finally { if (db != null) { db.Disconnect(); } }; }