private/db/Disconnect-Database.ps1

<#
.SYNOPSIS
    Closes the connection to the database and flushes the file.
#>

function Disconnect-Database {
    [CmdletBinding()]
    param (
        # The database connection to close.
        $Database
    )
    if ($Database) {
        $Database.Close()
        $Database.Dispose()
    }
}