
57 Md. App. 766 (1984)
471 A.2d 1121
MASS TRANSIT ADMINISTRATION
v.
GRANITE CONSTRUCTION COMPANY.
No. 554, September Term, 1983.
Court of Special Appeals of Maryland.
March 6, 1984.
Brian Cohen, Asst. Atty. Gen., with whom were Stephen H. Sachs, Atty. Gen. of Maryland, Robert B. Harrison, III, Asst. Atty. Gen., and Maurice F. Ellison, Jr., Sp. Legal Advisor, Baltimore, on brief, for appellant.
Robert M. Fitzgerald, Vienna, Va., with whom were Geoffrey T. Keating, Andrew D. Ness, Patricia A. Benzinger and Lewis, Mitchell & Moore, Vienna, Va., on brief, for appellee.
Argued before BISHOP, BLOOM and BELL, JJ.
BLOOM, Judge.
The Circuit Court for Baltimore City reversed a decision of the Maryland State Board of Contract Appeals (the Board) that had denied a claim of Granite Construction Company (Granite) for additional compensation arising out of a subway construction contract between Granite and the Mass Transit Administration (MTA).
The Board had held that the contract unambiguously required Granite to perform the work (gas line relocation) for which Granite was claiming additional compensation and that a provision in the contract prohibiting reliance upon oral explanations should be enforced literally. Granite filed a motion for reconsideration in which, for the first time, it urged that the doctrine of unjust enrichment should be applied. MTA responded with arguments that unjust enrichment had not been raised in a timely fashion, that it was barred by the doctrine of sovereign immunity, and that it is inapplicable where the entire subject matter is covered by an express contract. The Board denied the motion for reconsideration on the ground that the issue of unjust enrichment was not timely raised. Granite then asked the Board to reconsider its denial of the motion for reconsideration. The Board decided to consider the unjust enrichment claim and then ruled that the existence of an express contract precluded the application of the doctrine of unjust enrichment.
Granite appealed to the Baltimore City Court (now the Circuit Court for Baltimore City). The court agreed with the Board's original finding that the contract required Granite to perform the gas line relocation work but held that the doctrine of unjust enrichment did apply under the facts of the case. The court remanded the case to the Board to determine the worth of the gas line relocation work to MTA and to determine the applicability of the doctrine of sovereign immunity to an unjust enrichment claim.
In this appeal from that order of the circuit court, MTA raises the following questions:
1. Does sovereign immunity bar an unjust enrichment action?
2. Is unjust enrichment barred by the principle that where there is an express contract there can be no implied contract on the same subject matter?
3. Does the clean hands doctrine preclude recovery for unjust enrichment?
4. Can unjust enrichment recovery be granted where there is an adequate remedy at law?
5. Did the Board of Contract Appeals err in reversing its decision of November 25, 1981, and deciding to consider the merits of the unjust enrichment argument?
We need not answer all of those questions. Our review of the facts persuades us that MTA was not unjustly enriched; and an analysis of the parties' arguments pertaining to the doctrine of sovereign immunity and the principle of unjust enrichment leads us to conclude that, in this case at least, the two concepts are sufficiently incompatible to bar recovery by Granite. In order to steer a course safely past Scylla (the State's waiver of sovereign immunity is limited to claims based on written contracts), appellee would have to sail into the maws of Charybdis (the principle that unjust enrichment does not apply if there is a written contract).

FACTS
In November 1977 MTA issued an invitation for bids on a contract to construct the Laurens Street Station, a segment of the Baltimore Region Rapid Transit System. During the bidding period, Roy Vaught, Granite's lead estimator, noted what appeared to him to be an ambiguity in the contract drawings. On sheet 89 of the contract drawings there was a notation that the required relocation of gas lines as shown thereon would be done by Baltimore Gas and Electric Company (BG & E). The question in Mr. Vaught's mind was whether that notation applied only to the gas line relocation work shown on sheet 89 or to all required gas line relocation work that appeared on sheets 89 through 95 of the contract drawings.
For an answer to his question, Mr. Vaught telephoned Murray Weiner, MTA Project Engineer for the design of the Laurens Street project. The names and telephone numbers of Mr. Weiner and a Mr. R. Hampton were listed in the "Notice to Contractors" included in the contract documents supplied to bidders with the notation that "Questions Regarding the Work" should be directed to those individuals by mail or telephone. Weiner told Vaught that he did not know the answer to Vaught's question as to responsibility for gas line relocation but would get the appropriate person in touch with Vaught to provide an answer. Weiner tried to telephone the Project Engineer for MTA's general consultant and then MTA's own utility engineer, but neither of them could be reached at that time. He then called Granite and told Vaught that the two people who he would normally contact with that sort of question were not immediately available, but one of them would telephone Vaught with the answer to his question. Vaught protested that the deadline for submitting bids was fast approaching and requested an answer from Weiner. Although Weiner insisted he was not familiar with the utility drawings, Vaught pressed him to answer the question to the best of his ability. Weiner looked at the drawings for a few minutes and then, after reiterating that he was not the proper expert to interpret the drawings, expressed to Vaught his opinion that the plans called for BG & E to do all the gas line relocation work.
Based on Weiner's opinion that BG & E would do all of the gas line relocation work, Vaught estimated the work required to support the gas lines in the areas of the station and a vent shaft, which work was consistent with the notation on drawing sheet 89 and with the answer Weiner had given him. He then inserted those amounts in the overall estimate for the Laurens Street contract. The bid submitted by Granite shows that $12,800 was allocated to the gas facilities work, Items 82 and 87; whereas MTA estimated those two items at $127,800 and other bidders had assigned as much as $270,000 to Item 87 alone.
When the bids were opened on January 31, 1978, Granite's bid of $36,283,000 was found to be the lowest bid;[1] and the contract was awarded to Granite. On April 5, 1978, there was a meeting among representatives of MTA's construction manager, BG & E and Granite, as a result of which Granite clearly became aware that it was required to do the gas line relocation work despite the fact that it had included no money in its bid for such work. The members of Granite's field staff who attended that meeting as well as its officer who signed the contract with MTA were unaware of Vaught's prior conversations with Weiner and apparently assumed that the failure to include money for the gas line relocation in the bid was either an oversight or a tactical decision.
After the work was done, Granite's field staff learned of the pre-bid telephone conversations between Vaught and Weiner, whereupon Granite submitted its claim for additional compensation in accordance with the administrative review procedures set forth in the contract, which included the right of appeal to the Maryland Department of Transportation Board of Contract Appeals.

SOVEREIGN IMMUNITY
"The doctrine of sovereign immunity from suit, rooted in the ancient common law, is firmly embedded in the laws of Maryland." Katz v. Wash. Suburban Sanitary Comm'n, 284 Md. 503, 507, 397 A.2d 1027 (1979); Austin v. City of Baltimore, 286 Md. 51, 53, 405 A.2d 255 (1979). "If an action is brought for a money judgment in contract or in tort against the State or an agency of the State without the State's consent, actual or implied, it must be defended on the ground of sovereign immunity, which cannot be waived unless funds have been appropriated for the purpose or the agency can provide funds by taxation...." American Structures v. City of Baltimore, 278 Md. 356, 359, 364 A.2d 55 (1976) (citations omitted).
The defense of sovereign immunity was abrogated in Maryland by Chapter 53 of the Laws of 1786 but reinstated by Chapter 210 of the Laws of 1820. See Calvert Associates v. Dept. of Employment and Social Services, 277 Md. 372, 376, 357 A.2d 839 (1976). It has since been partially abrogated or waived. Chapter 450 of the Laws of 1976, originally codified as art. 41, § 10A of the Annotated Code of Maryland, subsequently recodified as Md. Ann. Code art. 21, §§ 7-101 through 7-104, prohibits the State and its officers, departments, agencies, boards, commissions or other units of State government from raising the defense of sovereign immunity in the courts of this State "in an action in contract based upon a written contract executed on behalf of the State, or its department, agency, board, commission or unit by an official or employee acting within the scope of his authority."[2]

UNJUST ENRICHMENT
The doctrine of unjust enrichment applies where "`the defendant, upon the circumstances of the case, is obliged by the ties of natural justice and equity to refund the money.'" Dobbs, Handbook on the Law of Remedies § 4.2 (1973), quoting Lord Mansfield in Moses v. MacFerlan, 2 Burr. 1005, 97 Eng.Rep. 676 (K.B. 1760). This policy against unjust enrichment is the theory behind the restitutionary remedies. Those remedies serve to "deprive the defendant of benefits that in equity and good conscience he ought not to keep, even though he may have received those benefits quite honestly in the first instance, and even though the plaintiff may have suffered no demonstrable losses." Dobbs, supra, § 4.1. This court has previously set out the three elements that must be established in order to sustain a claim based on unjust enrichment:
1. A benefit conferred upon the defendant by the plaintiff;
2. An appreciation or knowledge by the defendant of the benefit; and
3. The acceptance or retention by the defendant of the benefit under such circumstances as to make it inequitable for the defendant to retain the benefit without the payment of its value [Footnote omitted].
Everhart v. Miles, 47 Md. App. 131, 136, 422 A.2d 28 (1980).
Restitution "did not spring full-blown from the temple of Blackstone. It emerged very slowly from a host of different sources, some in law and some in equity." Dobbs, supra, § 4.1; see also, 1 Palmer, The Law of Restitution, § 1.1 (1978). In equity, the principal restitutionary remedies are the constructive trust, the equitable lien, subrogation, and the accounting for profits. See Dobbs, supra, § 4.3. At law, the chief restitutionary remedy is quasi-contract. That is the remedy with which we are now concerned. Quasi-contract, as has often been said, is not really a contract at all. It is, rather, an "implied in law" contract, distinguishable from an implied in fact contract which is a true contract.
"The term [implied in fact contract] only means that the parties had a contract that can be seen in their conduct rather than in an explicit set of words. In other words, the [implied in fact] contract is proved by circumstantial evidence." Id., § 4.2.
A quasi-contract or implied in law contract, on the other hand, involves no assent between the parties, no "meeting of the minds." Instead the law implies a promise on the part of the defendant to pay a particular "debt." See 1 Palmer, supra, § 1.2. Thus, "[t]he implied in law contract is indeed no contract at all, it is simply a rule of law that requires restitution to the plaintiff of something that came into defendant's hands but belongs to the plaintiff in some sense." Dobbs, supra, § 4.2. It is from quasi-contract that "the common counts in general assumpsit came into use, notably the counts for money had and received, for goods sold and delivered (quantum valebat), and for work and labor done (quantum meruit)." 1 Palmer, supra, § 1.2 (footnote omitted). Although quasi-contract is often described as "equitable" and indeed recovery in restitution is based upon notions of justice and fairness, "this refers merely to the way in which a case should be approached, since it is clear that the action is at law and the relief given is a simple money judgment." Id.[3]
It should also be remembered that a money judgment recovered by virtue of quasi-contract is a remedy to prevent against the unjust enrichment of the defendant. Thus, the measure of the recovery is the gain to the defendant, not the loss by the plaintiff.
The restitution claim stands in flat contrast to the damages action in this respect. The damages recovery is to compensate the plaintiff, and it pays him, theoretically, for his losses. The restitution claim, on the other hand, is not aimed at compensating the plaintiff, but at forcing the defendant to disgorge benefits that it would be unjust for him to keep.
Dobbs, supra, § 4.1 (footnote omitted).
Generally, "quantum meruit is not applicable when compensation of the parties is covered by an express written contract." Standley v. Egbert, 267 A.2d 365, 368 (D.C. 1970) (citation omitted); see also, Wilderness Society v. Cohen, 267 A.2d 820, 822 (D.C. 1970). The rationale of quasi-contract is that a defendant should not be unjustly enriched by a benefit bestowed upon him by the plaintiff. Thus, the law, when there is no real promise by defendant to pay plaintiff, implies such a promise. See Dobbs, supra, § 4.2. Conversely, where an actual promise to pay does exist, there is no need to imply one. See Attorney Grievance Commission v. McIntire, 286 Md. 87, 93, 405 A.2d 273 (1979). First Nat'l Bank v. Burton, Parsons & Co., 57 Md. App. 437, 451, 470 A.2d 822 (1984), states succinctly, "When there is an express contract dealing specifically with the services rendered, quantum meruit is unavailable." That statement is followed by this quotation from Industrial Lift Truck Service Corp. v. Mitsubishi International Corp., 104 Ill. App.3d 357, 360-361, 60 Ill.Dec. 100, 104, 432 N.E.2d 999, 1002 (1982):
The general rule is that no quasi-contractual claim can arise when a contract exists between the parties concerning the same subject matter on which the quasi-contractual claim rests. (Citations omitted.) The reason for this rule is not difficult to discern. When parties enter into a contract they assume certain risks with an expectation of a return. Sometimes, their expectations are not realized, but they discover that under the contract they have assumed the risk of having those expectations defeated. As a result, they have no remedy under the contract for restoring their expectations. In desperation, they turn to quasi-contract for recovery. This the law will not allow.

THE UNJUST ENRICHMENT CLAIM
Granite's claim for unjust enrichment is founded upon its assertion that Mr. Weiner's statement concerning the gas line relocation work induced Granite to omit funding for that work from its bid. Granite contends that it should be allowed to recover in quasi-contract because, by misleading Granite as to responsibilities under the contract, MTA was unjustly enriched to the extent of the worth of the gas line relocation services it received without payment.
The difficulty with that argument is that it is founded on a faulty factual premise. There is no positive evidence that but for Weiner's erroneous interpretation Granite would have added the estimated cost of the gas line relocation work in its bid. That item represented less than one percent of the overall bid. If Mr. Vaught had not talked to Mr. Weiner and remained doubtful about the drawings, Granite might well have elected to absorb the cost of that work item in order to submit the lowest bid. The fact that Granite executed the contract after becoming aware that it would be required to do the work it had made no allowance for in its bid is significant in that respect. More importantly, the evidence does not establish that MTA "misled" Granite. It was totally unreasonable for Granite to press Weiner  who expressly disclaimed any expertise in the matter  to furnish an "off-the-cuff" interpretation of the contract drawings and then complain that it was misled by that interpretation. Moreover, Granite was clearly not entitled to rely upon Weiner's oral statement under any circumstances. Paragraph SGP-2.06 of the contract, entitled "Explanations," expressly prohibited such reliance. It provided:
Explanations desired by a prospective bidder regarding the Contract Drawings, Specifications, and other Bid Documents shall be requested in writing from the Administration. Requests shall include the Contract number and name and shall be directed to the address indicated in the Notice to Contractors. Oral explanations or instructions will not be binding. Any addenda resulting from these requests will be mailed to all listed holders of the Bid Documents. The Bidder shall acknowledge the receipt of all addenda in the space provided on the Proposal Form.
(Emphasis added.)
That provision was clearly intended to avoid one bidder gaining an advantage over other bidders by acquiring information not furnished the other bidders. Such policy has been recognized by federal authorities that have interpreted similar contract provisions.
Paragraph 1 instructs bidders to request explanations or interpretations in writing, and to do so in sufficient time to permit a reply to be given by the Government to all bidders before they submit their bids. To reinforce this rule, paragraph 1 also states that oral explanations or instructions given before award of the contract will not be binding. These rules were drawn in order to assure that all bidders in a formally advertised procurement are given the same information, and that their bids will be received and evaluated by the Government with impartiality as required by law.... Thus, the rules are necessary to maintain the integrity of the formally advertised bid system.... In view of the clear statement in paragraph 1 of the instruction to bidders, we conclude that even if the Government representatives made the statement attributed to them by appellant, they were without authority to do so for a single bidder and appellant was on notice that it relied on the oral explanation or instruction at its peril.

W. Chester Williams, Inc., ASBCA No. 17527, 73-1 BCA (CCH) ¶ 10,010, p. 49, 964 (1973) (emphasis added).
Granite relies upon Dep't of Gen. Serv. v. Cherry Hill Sand and Gravel Co., 51 Md. App. 299, 443 A.2d 628 (1982). There, a contractor was given an oral pre-bid statement which later proved to be erroneous. Under the contract, the contractor was required to supply the necessary "fill" at the job site. A representative of Cherry Hill asked a state representative whether there was sufficient on-site fill for the contract. The state representative stated that there was sufficient on-site fill. Subsequently, Cherry Hill was awarded the contract. In calculating its bid, Cherry Hill relied upon the statement that there was sufficient on-site fill. There was not sufficient fill, however, and Cherry Hill brought an action to recover the expense of hauling additional fill to the job site. In affirming the trial court's decision in favor of Cherry Hill, we relied, in part, upon the absence of an integration clause in the contract. We held that, since the contract was not an integrated one, the prior oral statement was admissible to prove the terms of the contract.
Here, there was a contract provision (SGP-2.06) that expressly precluded reliance upon oral explanations. It is just this type of provision that was conspicuously absent in Cherry Hill, in which we specifically noted that there was "no express language in the contract before us precluding oral clarifications...." Id. at 307, 443 A.2d 628. The existence of ¶ SGP-2.06 precluded Granite's reliance upon Mr. Weiner's statement.
Furthermore, Granite was advised before it signed the contract that it was responsible for the gas line work. At the April 5, 1978, meeting, BG & E representatives informed Granite's field staff that Granite was responsible for the gas line relocation. It is a well-settled rule of agency law that notice to an agent, who has actual or apparent authority to receive it, is binding on his principal. Unsatisfied Claim and Judgment Fund Bd. v. Fortney, 264 Md. 246, 255, 285 A.2d 641 (1972). Granite could not seriously contend that its field staff personnel had neither express nor implied authority to receive information concerning the company's responsibilities under the construction contract. The knowledge of Granite's field staff was imputable to Granite, as was the knowledge of its lead estimator, Mr. Vaught.
Some courts have held that "when the bidder discovers the error [in his bid] after full or part performance and the goods or services transferred are not returnable, relief from the mistaken bid will require a recovery of the value of the performance in quasi contract, not limited by the contract price." Palmer, supra, § 12.20 (footnote omitted) (emphasis added). Here, Granite was informed of its error, not only before it began performance but before it signed the contract. Any misconception attributable to the erroneous opinion extracted from Mr. Weiner was eliminated before the work was done by the notice to Granite's field staff.
For a plaintiff to be successful in a quasi-contract action, he must show not only that the defendant was "enriched" but also that the enrichment was "unjust" so that considerations of natural justice and equity require a recovery by plaintiff. Here, Granite has failed to make such a showing. Viewed in a light most favorable to Granite, its failure to include the necessary funds in its bid resulted from improper reliance, contrary to the bidding requirements, upon an oral opinion given by an individual who (1) had no right to give it and (2) expressly disclaimed sufficient knowledge to support it. Furthermore, before Granite executed the contract, it was fully apprised of its obligation under the contract to perform the gas line relocation. Thus, while MTA's "enrichment" may not have been just, it was not "unjust."

THE SOVEREIGN IMMUNITY  UNJUST ENRICHMENT DILEMMA
Even if we were persuaded that MTA had been unjustly enriched to the extent of Granite's gas line relocation work, we would be forced to conclude that sovereign immunity would be a complete bar to recovery.
As we have seen, sovereign immunity bars recovery unless waived or abrogated by the State and that the State has waived the defense only with respect to those contract claims which are "based upon a written contract executed on behalf of the State, ... by an official or employee acting within the scope of his authority." Md. Ann. Code, art. 21, § 7-101. We have also seen that recovery for unjust enrichment is based upon an implied in law contract. The two concepts are incompatible. However meritorious a claim based upon an implied contract may be, if that claim is against the State or any of its agencies, it is barred because it is not based upon a written contract. In this case, it would also be barred because it is allegedly based upon a contract implied as a result of conduct on the part of an employee who was acting outside the scope of his employment.
Appellee seeks to avoid the bar of sovereign immunity by arguing that its claim is really based on or derived from the $36,283,000 written subway construction contract that was duly executed by an authorized agent of MTA and duly performed by Granite over a period of two-and-a-half years. But that attempt to steer the claim away from the rock ran it directly into the whirlpool. The only way that Granite's unjust enrichment claim can be said to be based upon a written contract is to recognize the written subway construction contract as one "dealing specifically with the services rendered," in which case recovery on a quantum meruit basis is unavailable. First Nat'l Bank v. Burton, Parsons & Co., supra.
JUDGMENT REVERSED. CASE REMANDED FOR THE ENTRY OF A JUDGMENT AFFIRMING THE DECISION OF THE MARYLAND STATE BOARD OF CONTRACT APPEALS.
COSTS TO BE PAID BY THE APPELLEE.
NOTES
[1]  Granite would have been the low bidder even if the amount it seeks under its unjust enrichment claim had been added to its bid.
[2]  There is also a waiver of sovereign immunity in certain tort actions. Md.Cts. & Jud.Proc.Code Ann., §§ 5-401 through 5-408, the Maryland Tort Claims Act. That statute has no applicability to this case.
[3]  This is to be distinguished from an action in equity, where the plaintiff can gain restitution of a specific property (constructive trust) or receive an interest in specific property (equitable lien).
