
637 N.W.2d 362 (2001)
10 Neb. App. 732
Dale SHAUL and Klayton Johnson, Appellants,
v.
Robert M. BRENNER, Banner County Attorney, Appellee.
No. A-00-1124.
Court of Appeals of Nebraska.
December 18, 2001.
*364 James L. Zimmerman, of Sorensen, Zimmerman & Mickey, Scottsbluff, for appellants.
Vincent Valentino, of Angle, Murphy, Valentino & Campbell, P.C., York, for appellee.
HANNON, SIEVERS, and MOORE, Judges.
HANNON, Judge.

INTRODUCTION
Dale Shaul and Klayton Johnson (plaintiffs) sued Robert M. Brenner, Banner County Attorney, for "disaffirmance" of diversion agreements they respectively entered into with Banner County to avoid prosecution for alleged criminal offenses and to recover the money they each paid pursuant to the agreements. Brenner demurred for all of the six reasons stated in Neb.Rev.Stat. § 25-806 (Reissue 1995), and the demurrer was sustained upon a finding that there was a defect of parties and a lack of jurisdiction. Plaintiffs elected to stand on their petition, and the action was dismissed. We affirm.

SUMMARY OF FACTS
Summarized, in the petition, plaintiffs allege that they are county commissioners of Banner County, Nebraska; that Brenner was the county attorney for Banner County; that they, along with two other county commissioners, were advised in a letter from Brenner, acting in his capacity as county attorney, to appear with counsel at the courthouse in Harrisburg, Banner *365 County, at 9 a.m. on February 12, 1999; and that at the meeting, Brenner handed each of the persons present a sheet of paper, a copy of which was attached to the petition as an exhibit, which contained a list of the crimes each person was alleged to have committed and the citations to the statutes allegedly violated. The crimes listed were perjury, false reporting, false statement under oath, abuse of public records, theft greater than $500, obstructing government operations, official misconduct, failure to report/disclose in violation of accountability and disclosure act, failure to disclose potential conflicts of interest, and false reporting of income on financial statement to the county and state.
The petition also alleged that plaintiffs requested Brenner to disclose which crimes listed were applicable to them specifically. Brenner declined to do so, and he did not state any facts to support those crimes listed. Brenner then handed each person a diversion agreement and stated that every person had to agree to the diversion agreement and pay the money listed within or else those above-listed criminal charges would be filed against all of them. Copies of the signed diversion agreements were attached as exhibits to the petition. Plaintiffs alleged that Brenner stated that if any of the four, even just one person, elected to not sign the agreements or pay the money listed, then charges would be filed against all of them.
Plaintiffs alleged that they had an attorney present at this meeting and that the attorney signed the diversion agreements as their attorney. Plaintiffs allege that Brenner should have known that when he stated that the charges would be filed if even one person did not sign the agreement, a conflict of interest would arise between each party and the one attorney who was representing all of them, and that this attorney could not advise them because of that conflict.
Plaintiffs further alleged that they asked Brenner how he arrived at the amount of money they were required to pay under the agreement, but that he declined to answer. Plaintiffs signed the diversion agreement, and each agreed to pay $10,000 by March 12, 1999. The agreement stated that $7,000 was to be paid to Banner County for the "Banner County Weed Department" and a receipt was to be given reflecting the amount paid to the weed department and that $3,000 was to be paid to the "Banner County School" as an unspecified gift. Plaintiffs paid the money by checks payable to Brenner's trust account with notations indicating the purposes. Of the money each plaintiff paid, $3,000 was paid to the Banner County School District, but $7,000 was credited to the road fund, not the weed department.
The petition goes on to allege that Brenner was interviewed by a reporter from a Scottsbluff, Nebraska, newspaper and that Brenner stated that the settlement was reached because there was insufficient evidence for prosecution. Plaintiffs allege that they were fraudulently induced to sign the diversion agreement by virtue of material misrepresentations and fraud by Brenner; that Brenner did not act in good faith, but with a corrupt motive; that he represented that he had sufficient evidence to charge plaintiffs with various crimes; and that Brenner acted maliciously, intentionally, and recklessly when he induced plaintiffs to sign the agreement.
Plaintiffs also allege that Banner County had not adopted a diversion program as provided by Neb.Rev.Stat. § 29-3603 (Reissue 1995) because the diversion agreement did not contain a provision allowing them to withdraw from the agreement.
*366 The prayer of the petition then asked for an order disaffirming the diversion agreement and an order requiring Brenner to repay the sums paid.
Brenner filed a demurrer in which he listed all the grounds provided in § 25-806. After a hearing, the district court sustained the demurrer, stating there was a defect in parties, both plaintiffs and defendant, and that the court lacked subject matter jurisdiction because of governmental immunity. Plaintiffs elected to stand on the petition, and the case was dismissed. Plaintiffs appealed.

ASSIGNMENT OF ERROR
Plaintiffs assign that the trial court erred in finding that the district court lacked jurisdiction over the subject matter because of governmental immunity.

STANDARD OF REVIEW
In reviewing an order sustaining a demurrer, an appellate court accepts the truth of the facts which are well pled, together with the proper and reasonable inferences of law and fact which may be drawn therefrom, but does not accept the conclusions of the pleader. Mulinix v. Roberts, 261 Neb. 800, 626 N.W.2d 220 (2001).
Whether a petition states a cause of action is a question of law regarding which an appellate court has an obligation to reach a conclusion independent of that of the inferior court. Cobb v. Sure Crop Chem. Co., 255 Neb. 625, 587 N.W.2d 355 (1998); Sweeney v. City of Gering, 8 Neb.App. 675, 601 N.W.2d 238 (1999).
When reviewing questions of law, an appellate court has an obligation to resolve the question independently of the conclusion reached by the trial court. Mertz v. Pharmacists Mut. Ins. Co., 261 Neb. 704, 625 N.W.2d 197 (2001).

ANALYSIS
Brenner demurred on all of the statutory grounds, but the court sustained the demurrer based upon governmental immunity and defect of parties, both plaintiffs and defendant. Plaintiffs state that the trial court's finding that there was a defect in parties is moot because the trial court found it lacked jurisdiction. We do not agree with that position. An order sustaining a demurrer will be affirmed if any ground on which it was asserted is well taken. Lawry v. County of Sarpy, 254 Neb. 193, 575 N.W.2d 605 (1998). We will therefore consider the first and simplest issue which is dispositive of this appeal.
The trial court concluded it lacked jurisdiction because of governmental immunity. Plaintiffs, in disagreement with the trial court's finding, cite Koch v. Grimminger, 192 Neb. 706, 223 N.W.2d 833 (1974), which held that a public prosecutor acting within the general scope of his authority is immune from suit, but it also stated that a prosecutor who knows that a particular charge is groundless in law or in fact and who nonetheless files a charge and thus acts with a corrupt motive is not immune from suit. Id.
Plaintiffs then argue that the diversion program was not established by Banner County with the concurrence of the county board as required by Neb.Rev.Stat. § 29-3602 (Reissue 1995) and that the Legislature's findings contained in Neb.Rev.Stat. § 29-3601 (Reissue 1995) show the program was to be voluntary with the accused having an opportunity for counsel prior to the decision to participate in the diversion program. Plaintiffs then argue that Brenner's action forced them to sign the diversion agreement to protect their colleagues and that since all four county commissioners had one attorney and were told they all *367 must sign or Brenner would withdraw the offer to all, they lacked an attorney without a conflict. Thus, they argue they have a cause of action.
One of the basic problems with plaintiffs' argument is that it ignores the prayer of their petition. In the prayer, they asked for "an Order disaffirming the Diversion Agreement and order the defendant, Robert M. Brenner to repay to them the sums of money paid by them as a result of their detrimental reliance." While the word "disaffirming" is used, the prayer really asks that the diversion agreement be canceled (on the ground of fraud) and that they recover from Brenner the money they paid. Such an action is frequently called a suit for rescission.
In Koch v. Grimminger, supra, the action was a tort action, and it was analyzed as such with the court citing to the Restatement (Second) of Torts for authority. Here, plaintiffs do not allege or pray for any damages, but, rather, for a return of the money paid.
The Nebraska Supreme Court has stated:
[O]ne who has been induced to enter into [a contract] by virtue of a material misrepresentation, that is to say, by virtue of fraud, may either affirm the agreement and sue for damages or disaffirm the agreement and sue to be reinstated to his or her position as it existed before entry into the contract.
Genetti v. Caterpillar, Inc., 261 Neb. 98, 120, 621 N.W.2d 529, 546 (2001). See, also, Russo v. Williams, 160 Neb. 564, 71 N.W.2d 131 (1955). "This is so because one remedy, damages, depends upon the existence of a contract, and the other, rescission, depends upon the concept that because of the fraud, no contract came into existence." Genetti, 261 Neb. at 120, 621 N.W.2d at 546. Likewise, our courts have held that the remedies of rescission and damages are inconsistent; the former proceeding upon disaffirmance, and the latter on affirmance of the contract. Genetti, supra; Russo, supra.
The diversion agreements attached to the petition stated: "Banner County, by and through its County Attorney, Robert M. Brenner, first party ... [.]" This action is an action to rescind separate contracts between each of the plaintiffs and Banner County. "`"All parties to [an] instrument sought to be canceled are necessary parties to the suit for cancellation, either as plaintiffs or as defendants...."'" Rumbel v. Ress, 166 Neb. 839, 846, 91 N.W.2d 36, 42 (1958). Neb.Rev.Stat. § 23-101 (Reissue 1997) provides: "Each county, established in this state according to the laws thereof, shall be a body politic and corporate ... and by that name may sue and be sued...." A county must be sued in the name designated in the statute. Jameson v. Plischke, 184 Neb. 97, 165 N.W.2d 373 (1969) (suit against board of supervisors was held not against county in suit involving deed). Since plaintiffs were asking the trial court to disaffirm the diversion agreement based upon fraud or misrepresentation and return money to plaintiffs, this is an action asking to rescind the contract, and Banner County is a necessary party that was not made a party.
Furthermore, Neb.Rev.Stat. § 23-135 (Cum.Supp.2000) provides for filings of a claim with the county clerk within 90 days. That statute has been held to apply to all claims against a county arising ex contractu. McCollough v. County of Douglas, 150 Neb. 389, 34 N.W.2d 654 (1948). There is nothing in the record which shows such a claim was filed by plaintiffs.
In the prayer of their petition, plaintiffs ask Brenner to repay them what they paid Brenner. Attached to the petition *368 are checks showing that plaintiffs paid the sums of money to Brenner's trust account. However, plaintiffs also attached receipts showing that the sums paid to the trust account had been paid out to the county and to the county school. While the petition shows Brenner to be a county official, he is not the county. He was representing the county as an agent of the county. The allegations in the petition clearly show an agent-principal relationship was disclosed to plaintiffs. A "longstanding tenet of the law is that if a contract is made with a known agent acting within the scope of his or her authority for a disclosed principal, the contract is that of the principal only and the agent cannot be held personally liable thereon." Coffey v. Mann, 7 Neb.App. 805, 810, 585 N.W.2d 518, 523 (1998). Accord Hecker v. Ravenna Bank, 237 Neb. 810, 468 N.W.2d 88 (1991). This court has also recently held:
In order to exempt an agent from liability upon an instrument executed by the agent within the scope of the agent's agency, the agent must not only name his or her principal, but must express by some form of words that the writing is the act of the principal, though done by the hand of the agent. If the agent expresses this, the principal is bound and the agent is not.
780 L.L.C. v. DiPrima, 9 Neb.App. 333, 340, 611 N.W.2d 637, 644 (2000). See Lincoln Equipment Co. v. Eveland, 173 Neb. 174, 112 N.W.2d 755 (1962).
The diversion agreement clearly states in the beginning, "Banner County, by and through its County Attorney, Robert M. Brenner," and in conclusion, the signature line reads, "COUNTY OF BANNER COUNTY, By [Brenner's signature] Robert M. Brenner, Banner County Attorney." Regarding the effect of the signature of an agent, it is generally understood that in "the absence of a contrary manifestation in the document, the following signatures and descriptions, among others, create an inference that the principal and not the agent is the party: The principal's name followed by the agent's name preceded by a preposition such as `by' or `per.'" Restatement (Second) of Agency § 156 at 372 (1958). See, also, 3 Am.Jur.2d Agency § 171 (1986); 780 L.L.C. v. DiPrima, supra. The manner of Brenner's signature on the diversion agreement clearly shows he signed the document on behalf of the county, not in his individual capacity.
We therefore conclude that the petition does not state a cause of action against Brenner and that Banner County is a necessary party. An order sustaining a demurrer will be affirmed if any ground on which is was asserted is well taken. Lawry v. County of Sarpy, 254 Neb. 193, 575 N.W.2d 605 (1998). Regarding the other grounds, we do not address those here. An appellate court is not obligated to engage in an analysis which is unnecessary to adjudicate the case and controversy before it. Kelly v. Kelly, 246 Neb. 55, 516 N.W.2d 612 (1994); State v. Clark, 8 Neb.App. 525, 598 N.W.2d 765 (1999).

CONCLUSION
Since Brenner was acting as an agent for Banner County in entering into the diversion agreement with plaintiffs and not in his individual capacity, under contract law, he is not liable for the acts of the disclosed principal, Banner County. We find that the trial court did not err in sustaining the demurrer as it clearly did not state a cause of action against Brenner and that there is a defect in parties. We affirm the dismissal of the petition.
AFFIRMED.
