(a) He may be discharged from further performance.

(b) If he has done anything under the contract, he has a right to sue on the quantum meruit, a cause of action distinct from that arising out of the original contract, and based upon a contract created by law.

(c) He has a right of action on the original contract, or term of the contract broken, and may maintain:

(1) A suit to obtain damages for the loss sustained by the breach.

(2) A suit to obtain specific performance of the contract by the other party.

We have seen that if a contract is discharged by the breach the party injured is exonerated from further performance, provided he treats the breach as a discharge. Where he relies on a discharge, his remedy is by setting up his discharge as a defense in an action brought by the other party on the contract. In addition to his right to a discharge from performance, he has a right, if he has done anything under the contract, to sue on the quantum meruit for compensation for his partial performance.86 This cause of action is distinct from that arising out of the original contract. It is based upon a new contract, generally called an implied contract, but really a quasi contract, or contract created by law, because of the receipt by the other party of the benefits of such performance. In addition to these rights, the party so injured by a breach has a right of action based upon the original contract or term of the contract broken. This remedy exists not only where he is discharged by the breach, but also where he is not discharged, or where, though he was entitled to claim a discharge, he has preferred to waive such right, and go on with the contract. His remedy in this case is of two kinds: (1) He may seek, in a court of law, to obtain damages for the loss he has sustained by himself taking the initiative and bringing an action for damages, or by waiting until the other party sues him, and then asserting his right by way of recoupment, counterclaim, or cross action. He may resort to this remedy whether he claims a discharge by reason of the other's breach or not. (2) He may, in the case of certain contracts and under special circumstances, obtain specific performance of the contract by the other party, by bringing a suit in equity for that purpose. Of course he would not be entitled to such performance unless he performed the contract on his part, or offered to perform it, and therefore he cannot resort to this remedy where he claims a discharge from further performance.