Beispiel #1
0
        /// <summary>
        /// Closes the connection to the database. This is the preferred method of closing any open connection.
        /// </summary>
        /// <exception cref="T:System.Data.Common.DbException">
        /// The connection-level error that occurred while opening the connection.
        /// </exception>
        public override void Close()
        {
            if (State == ConnectionState.Closed)
            {
                return;
            }

            if (_client != null)
            {
                _client.Dispose();
            }

            _state = ConnectionState.Closed;
        }
 public void Stop()
 {
     _database.Dispose();
 }