In all cases of application to said court to foreclose any mortgage or deed of trust, the equity court shall have authority, instead of decreeing that the mortgagor be foreclosed and barred from redeeming the mortgaged property, to order and decree that said property be sold and the proceeds be brought into court to be applied to the payment of the debt secured by said mortgage; and if, upon a sale of the whole mortgaged property, the net proceeds shall be insufficient to pay the mortgage debt, the court may enter a decree in personam against the mortgagor or other party to the suit who is liable for the payment of the mortgage debt for the residue of said debt remaining unsatisfied after applying to said debt the proceeds of such sale; provided, that the complainant would be entitled to maintain an action at law or suit in equity for said residue; which decree shall have the same effect and be enforced by execution in the same manner as a judgment at law. And in suits to enforce a vendor's lien on real estate for unpaid purchase money similar relief may be given by a decree of sale and a decree in personam for the unsatisfied residue of the purchase money due.
D.C. Code § 42-816