Did the trial court err in entering judgment of involuntary non-suit?
“In order to create a lien in favor of a person who builds a house upon the land of another the circumstances must be such as to first create the relationship of debtor and creditor, and then it is for the debt that he has a lien. The lien does not exist without a contract. [Citations]
“ ‘The law seems to be settled in this State that there must be a debt due from the owner of the property before there can be a lien. The debt is the principal, the basis, the foundation upon which the lien depends. The lien is but an incident, and cannot exist without the principal.’ [Citations] And a debt contracted is a debt agreed to be paid. [Citations]
“The debt must be such as would entitle the claimant to a personal judgment for the amount due. [Citation]”
The complaint alleges that an express contract was entered into between plaintiff and Mr. and Mrs. Nelson, but the evidence was not sufficient to support this allegation. In fact, the evidence was insufficient to show a contract between plaintiff and either of the other parties. The evidence is summarized as follows:
Plaintiff testified that on one occasion he met with Mrs. Nelson in Mr. Nelson’s office for a discussion of the plans for constructing a residence for her and her husband; that Mrs. Nelson participated in said discussion and made suggestions specifically as to the construction of a powder room. On another occasion plaintiff met the parties in their home and there discussed plans for the proposed house; Mrs. Nelson participated in that conversation and discussion. Pursuant to these conversations, plaintiff began construction of a residence on the land described in the complaint.
*336The witness Milton Leffew testified that he was present during the meeting in the home at which Mrs. Nelson and Mr. Nelson were present and the discussion dealt with the plans for the construction of the proposed house. Two employees of plaintiff were called as his witnesses. Each testified regarding separate occasions when Mrs. Nelson and Mr. Nelson went to the site on which the residence was being constructed.
No testimony was provided as to any agreement regarding the contract price of the house, when the house would be paid for, etc. The evidence presented did not make out a case of simple debt against the feme defendant or the estate of her late husband.
 Had the evidence been sufficient to make out a case of contract for indebtedness against the estate of Nelson, for the reasons set forth in Air Conditioning Co. v. Douglass, 241 N.C. 170, 84 S.E. 2d 828, and Clark v. Morris, 2 N.C. App. 388, 162 S.E. 2d 873, plaintiff would not be entitled to a laborers’ and materialmen’s lien against the property described in the complaint. We do not deem it necessary to repeat the well-settled principles stated in those decisions.
 In his brief plaintiff argues that if the judgment appealed from is allowed to stand, Mrs. Nelson will be unjustly enriched at the expense of plaintiff. In R. R. v. Highway Commission, 268 N.C. 92, 150 S.E. 2d 70, it is said:
“The general rule of unjust enrichment is that where services are rendered and expenditures made by one party to or for the benefit of another, without an express contract to pay, the law will imply a promise to pay a fair compensation therefor. Beacon Homes, Inc. v. Holt, 266 N.C. 467, 146 S.E. 2d 434; Dean v. Mattox, 250 N.C. 246, 108 S.E. 2d 541.
“The action is based upon the equitable principle that a person should not be permitted to enrich himself unjustly at the expense of another. . . .”
[4-6] Plaintiff’s action is based on breach of contract for which he seeks legal relief. While a party may obtain legal or equitable relief, or both, in the same court and in the same action, he must allege the facts upon which the court may grant such relief; equitable relief will be granted only when the facts set forth bring the case within the recognized jurisdiction in equity. Furthermore, when a case has been tried in the trial court on a particular theory, a litigant may not switch theories when he gets to the appellate court. *3371 McIntosh, N.C. Practice and Procedure § 999(4) (5), and cases therein cited.
The judgment of the superior court is
Bbitt and GRAham, JJ., concur.