void Close() { if (!HasSelfCreateConnection) return; if (connection != null && connection.State != ConnectionState.Closed /* && connection is ConnectionWrapper*/) { try { connection.Close(); } catch { } connection.Dispose(); connection = null; } }