■ Plaintiff Eastway Wrecker Service, Inc. (“Eastway”) appeals from an order dismissing its claims against defendant City of Charlotte based on quantum meruit and negligent misrepresentation. We hold that the quantum meruit cause of action is barred by sovereign immunity while the negligent misrepresentation cause of action failed to include all the allegations necessary to state a claim for relief. We, therefore, affirm.
Plaintiff entered into an agreement with defendant providing that plaintiff would tow, store, and dispose of motor vehicles, as directed by the police, for a specified geographical area known as Zone C. Plaintiff was to pay defendant $2,000.00 annually for the right to service Zone C and agreed to various specifications and conditions regarding documentation, service hours, and storage facilities, as well as a fee schedule for services rendered and the sale of unclaimed motor vehicles.
In a complaint filed 28 March 2002 and amended in August 2002, plaintiff alleged that defendant breached the agreement by failing to pay plaintiff for services provided under the agreement. In its amended complaint, plaintiff added alternative claims for (1) damages in quantum meruit for labor and materials supplied; (2) for negligent misrepresentation by defendant in connection with the agreement; and (3) breach of the covenant of good faith and fair *641dealing. Defendant filed a motion to dismiss the alternative claims pursuant to Rule 12(b)(6). Following a hearing, the trial court entered an order on 6 January 2003 granting defendant’s motion to dismiss as to plaintiffs quantum meruit and negligent misrepresentation claims, but denying it as to the claim for breach of the implied covenant of good faith and fair dealing. As a result, plaintiffs claims for breach of contract and breach of the implied covenant of good faith and fair dealing remain pending. Plaintiff appeals from the 6 January 2003 order.
Because the trial court’s order granting defendant’s motion to dismiss did not dispose of all of plaintiff’s claims against defendant, the order is interlocutory. DKH Corp. v. Rankin-Patterson Oil Co., 348 N.C. 583, 584, 500 S.E.2d 666, 667 (1998). The trial court, however, included a certification that the dismissal of plaintiff’s claims for quantum meruit and negligent misrepresentation was a “final judgment and dispositive as to these claims and there is no reason to delay an appeal.” In an action with multiple parties or multiple claims, Rule 54(b) provides that “if the trial court enters a final judgment as to a party or a claim and certifies there is no just reason for delay, the judgment is immediately appealable.” Id. at 585, 500 S.E.2d at 668. We agree with the trial court that the dismissal order was properly certified under Rule 54(b) and, therefore, address the merits of plaintiff’s appeal.
 To determine if a complaint is sufficient to withstand a Rule 12(b)(6) motion to dismiss, the trial court must “ascertain ‘whether, as a matter of law, the allegations of the complaint, treated as true, are sufficient to state a claim upon which relief may be granted under some legal theory.’ ” Plummer v. Community Gen. Hosp. of Thomasville, Inc., 155 N.C. App. 574, 576, 573 S.E.2d 596, 598 (2002) (quoting Shell Island Homeowners Ass’n v. Tomlinson, 134 N.C. App. 217, 225, 517 S.E.2d 406, 413 (1999)), disc. review denied, 357 N.C. 63, 579 S.E.2d 392 (2003). As an initial matter, we address the dissent’s conclusion that the trial court considered matters outside the pleadings, thereby converting the motion to dismiss into a motion for summary judgment under Rule 12(b): “If, on a motion asserting the defense numbered (6), to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and *642disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56.”
After carefully reviewing the record, it appears that the only documents other than the pleadings that were before the trial court in connection with the motion to dismiss were the plaintiff’s exhibits to the complaint. Since the exhibits to the complaint were expressly incorporated by reference in the complaint, they were properly considered in connection with the motion to dismiss as part of the pleadings. See Oberlin Capital, L.P. v. Slavin, 147 N.C. App. 52, 60-61, 554 S.E.2d 840, 847 (2001) (“Here, the loan agreement is the subject of [plaintiffs] complaint and is specifically referred to in the complaint. Therefore, the trial court did not err in reviewing the loan agreement when ruling on the Rule 12(b)(6) motions.”).
 Plaintiff first contends that the trial court erred in dismissing its alternative claim for recovery in quantum meruit on the grounds that such recovery was precluded by the existence of an express contract between the parties. While it is true that an express contract precludes recovery in quantum meruit, Paul L. Whitfield, P.A. v. Gilchrist, 348 N.C. 39, 42, 497 S.E.2d 412, 414 (1998), it was improper for the trial court to assume the presence of an express contract in this case. Under Rule 8(a)(2) of the North Carolina Rules of Civil Procedure, plaintiff is entitled to seek alternative forms of relief. N.C. Gen. Stat. § 1A-1, Rule 8(a)(2) (2003) (“Relief in the alternative or of several different types may be demanded.”). Here, plaintiff’s alternative claim for relief in quantum meruit does not allege that a contract exists, but rather that the parties’ contract is invalid because of defects in its formation and performance. When ruling on a Rule 12(b)(6) motion to dismiss, the trial court must only determine whether the plaintiff’s allegations, if taken as true, support a claim upon which relief may be granted. Sutton v. Duke, 277 N.C. 94, 98-99, 176 S.E.2d 161, 163 (1970); N.C. Gen. Stat. § 1A-1, Rule 12(b)(6) (2003). If plaintiff’s allegations in its alternative claim are accepted as true, no contract exists and quantum meruit is not precluded as a remedy per se. Accordingly, it was error for the trial court to dismiss plaintiff’s alternative claim for recovery in quantum meruit on the ground that it was precluded by an express contract between the parties.
*643Nonetheless, dismissal of the quantum meruit claim was still appropriate because such a claim when brought against an arm of the State is barred by sovereign immunity. In North Carolina, the State waives sovereign immunity when it expressly enters into a valid contract. Smith v. State, 289 N.C. 303, 320, 222 S.E.2d 412, 423-24 (1976). Sovereign immunity bars quantum meruit actions against the State, however, because the remedy of quantum meruit is based on an implied contract and an implied contract cannot support the inference of an express waiver. Whitfield, 348 N.C. at 42, 497 S.E.2d at 415. Our Supreme Court held in Whitfield that “[a] contract implied in law — as opposed to an express valid contract — simply will not form a sufficient basis for a court to make a reasonable inference that the State has intended to waive its sovereign immunity.” Id. at 45, 497 S.E.2d at 416.
This Court has since applied Whitfield and held: “[O]ur Supreme Court declined to imply a contract in law in derogation of sovereign immunity to allow a party to recover under a theory of quantum meruit, and we decline to do so here.” Data Gen. Corp. v. County of Durham, 143 N.C. App. 97, 103, 545 S.E.2d 243, 248 (2001). See also Moore v. N.C. Coop. Extension Serv., 146 N.C. App. 89, 93, 552 S.E.2d 662, 665 (citation omitted) (“In Whitfield, the Supreme Court held that the State’s waiver of sovereign immunity only applies to express contracts and that contracts implied in law, such as a claim in quantum meruit, are insufficient to constitute a waiver of the State’s sovereign immunity.”), disc. review denied, 354 N.C. 574, 559 S.E.2d 180 (2001). Archer v. Rockingham County, 144 N.C. App. 550, 557, 548 S.E.2d 788, 792 (2001), disc. review denied, 355 N.C. 210, 559 S.E.2d 796 (2002), relied upon by plaintiff, did not address a claim based on quantum meruit, but rather a claim arising out of a valid employment contract. It, therefore, did not — indeed could not — overrule Whitfield.
Plaintiff argues, however, that Whitfield’s sovereign immunity bar only applies in cases where a contract fails because it is ultra vires. Plaintiff urges that if a contract fails for some other reason, such as a defect in formation, then sovereign immunity does not protect the State from quantum meruit claims. Indeed, certain cases decided prior to Whitfield support plaintiff’s argument. See, e.g., Hawkins v. Town of Dallas, 229 N.C. 561, 564, 50 S.E.2d 561, 563 (1948); Rockingham Square Shopping Center, Inc. v. Town of Madison, 45 N.C. App. 249, 254, 262 S.E.2d 705, 708 (1980). Further, Whitfield itself involved a contract that was invalid because it was ulta vires. Whitfield, 348 N.C. at 43-44, 497 S.E.2d at 415-16.
*644The language and reasoning of Whitfield does not, however, support the continuing validity of such a distinction. The Supreme Court specifically held:
[W]e will not first imply a contract in law where none exists in fact, then use that implication to support the further implication that the State has intentionally waived its sovereign immunity and consented to be sued for damages for breach of the contract it never entered in fact. Only when the State has implicitly waived sovereign immunity by expressly entering into a valid contract through an agent of the State expressly authorized by law to enter into such contract may a plaintiff proceed with a claim against the State upon the State’s breach.
Id. at 42-43, 497 S.E.2d at 415 (emphasis original). Without both an express contract and a valid contract, the State has not waived its sovereign immunity. This dual requirement necessarily precludes any recovery in quantum meruit against the State regardless of the reason why the alleged contract fails. To the extent prior cases suggested that sovereign immunity only bars quantum meruit claims where the alleged contract is ulta vires, they were overruled by Whitfield.
Plaintiffs complaint also alleges that the City was engaged in a proprietary or ministerial act when entering into the contract at issue, arguably a basis for avoiding the sovereign immunity defense. The plaintiff has not, however, argued this theory on appeal and, therefore, we do not reach that question. Plaintiffs claim based on quantum meruit is barred by sovereign immunity and dismissal was, for that reason, proper.
 Plaintiff has also appealed from the dismissal of its claim for negligent misrepresentation. Plaintiff based its claim on (1) misrepresentations “in Item 4 of the Contract and Amendments that Eastway Wrecker shall be compensated per the attached fee schedule upon completion of the Contract[,]” (2) the City’s payment of some towing and storage charges, (3) statements by employees within the course and scope of their employment regarding payment, and (4) the failure of the City to “respond with any denial that charges had not accrued or there were no amounts owing.”
The Supreme Court has held that “[t]he tort of negligent misrepresentation occurs when a party justifiably relies to his detriment on *645information prepared without reasonable care by one who owed the relying party a duty of care.” Raritan River Steel Co. v. Cherry, Bekaert & Holland, 322 N.C. 200, 206, 367 S.E.2d 609, 612 (1988). Plaintiffs claim could properly be dismissed by the trial court pursuant to Rule 12(b)(6) if no law exists to support the claim, if the complaint fails to allege sufficient facts to assert a viable claim, or if the complaint alleges facts that will necessarily defeat the claim. Oberlin Capital, 147 N.C. App. at 61, 554 S.E.2d at 847. Here, the trial court properly dismissed the negligent misrepresentation claim for failure to allege all the required facts and because the complaint includes facts that necessarily defeat the claim.
Plaintiff alleged in its complaint that “[defendant owed a duty of care to Eastway Wrecker to provide accurate information in the Contract and Amendments and other actions and omissions set forth above.” Plaintiff further alleged that it “reasonably and justifiably relied upon the above misrepresentations to its detriment by entering into the Contract and Amendments to tow, store and dispose of vehicles for the Defendant from July 5, 1994 until October 31, 2001 and by actually towing, storing and disposing of the vehicles.”
It appears that plaintiff is at least in part alleging that the City failed to disclose the legal import of the contract or to properly memorialize the parties’ agreement. While it is questionable that such a contention, standing alone, could form a basis for a negligent misrepresentation claim, see International Harvester Credit Corp. v. Bowman, 69 N.C. App. 217, 220, 316 S.E.2d 619, 621 (internal citations omitted) (“[a] person who executes a written instrument is ordinarily charged with knowledge of its contents, and may not base an action for fraud on ignorance of the legal effect of its provisions”), disc. review denied, 312 N.C. 493, 322 S.E.2d 556 (1984), the Court need not reach that question. This Court has held that if “the complaint fails to allege that [the plaintiff] was denied the opportunity to investigate or that [the plaintiff] could not have learned the true facts by exercise of reasonable diligence, the complaint fails to state causes of action for fraudulent concealment and negligent misrepresentation.” Oberlin Capital, 147 N.C. App. at 60, 554 S.E.2d at 847. See also Hudson-Cole Dev. Corp. v. Beemer, 132 N.C. App. 341, 346, 511 S.E.2d 309, 313 (1999) (“[W]hen the party relying on the false or misleading representation could have discovered the truth upon inquiry, the complaint must allege that he was denied the opportunity to investigate or that he could not have learned the true facts by exercise of reasonable diligence.”). Because plaintiffs complaint fails *646to include this required allegation, it fails to state a claim for negligent misrepresentation.
Further, to the extent the complaint based its cause of action on representations by employees of the City regarding the contract and the amendments, the complaint establishes that any reliance by plaintiff was unjustified. The original contract states:
This contract together with the Invitation to Bid and, Instructions to Bidder, and the Bid Continuation Sheet-Specifications and Special Conditions constitutes the entire agreement between the City and the Contractor on this subject and its acceptance by the City Manager of the City, and no one is authorized to vary same unless the proposed substitution or variations are brought before the City Manager.
(Emphasis added.) Each of the amendments to the contract, extending the term of the agreement, specifically provided that the terms of the original contract “shall remain in force and effect.” As a result of these provisions, plaintiff was not entitled to rely upon statements of City personnel, other than the City Manager, regarding a variation of the terms of the contract. Since the contract and the amendments were incorporated by reference in the complaint, the complaint discloses facts that necessarily defeat plaintiff’s claim. See Oberlin Capital, 147 N.C. App. at 61, 554 S.E.2d at 847 (language of loan agreement established that any reliance was not reasonable and, therefore, “the trial court did not err in dismissing the claim for negligence”). The trial court thus properly granted the motion to dismiss the negligent misrepresentation claim.
Judge HUNTER concurs.
Judge McGEE dissents in a separate opinion.