public static void DisposeInstance() { if (_dbCore != null) { _dbCore.Close(); _dbCore.Dispose(); _dbCore = null; } //if (_cnn != null) //{ // _cnn.Dispose(); // _cnn = null; //} }
public static clsDBCore getInstance(string connString = "") { if (_dbCore == null) { try { _dbCore = new clsDBCore(connString); _dbCore.Open(); } catch (Exception ex) { Console.WriteLine("getInstance: " + ex.Message); } } return(_dbCore); }