
110 Wn.2d 555 (1988)
756 P.2d 129
TITO MORELLI, ET AL, Respondents,
v.
MIKE EHSAN, ET AL, Petitioners.
No. 54234-1.
The Supreme Court of Washington, En Banc.
June 2, 1988.
*556 Bogle & Gates, Don Paul Badgley, and James R. Spady, for petitioners.
Riddell, Williams, Bullitt & Walkinshaw, by J. Jeffrey Dudley, for respondents.
DOLLIVER, J.
Petitioners Mike and M.S. Ehsan (Ehsan) contend the Court of Appeals erred in holding the Morellis were entitled to a judicial dissolution and windup of an illegal partnership.
The Court of Appeals in its opinion has recounted the facts.
In November 1980, Tito Morelli, Dr. Mike Ehsan and a certified registered nurse, Anne Anholm, entered into a limited partnership agreement to establish and operate the Sunrise Emergency and Family Care Clinic in Everett, Washington. [Anholm subsequently sold her interest to Ehsan and is not a party to this action.] The clinic was to provide minor emergency treatment and health care to the general public on an out-patient basis. Morelli told Ehsan that he had consulted his lawyers and had been assured it was legal for a physician and a nonphysician to operate a medical clinic as partners.
Under the agreement, Morelli and Ehsan became co-general partners, sharing equally in profits and losses. The agreement provided that, in addition to their share of profits, Morelli and Ehsan could receive a salary for services rendered as employees of the partnership. The agreement also provided that, as general partners, Morelli and Ehsan would have equal rights in the management of the partnership business, and further defined *557 Morelli's areas of responsibility as "Director of Operations" and those of Ehsan as the "Medical Director" of the clinic. The clinic also employed a medical staff, including licensed physicians, who were paid on an hourly basis.
For most of the next 3 years, the clinic operated at a loss, finally showing a small profit in 1984. The partners were obliged to advance additional funds to keep the business going during that time. Morelli's additional contributions to the clinic, totaling $75,000, were later characterized as loans and evidenced by a series of promissory notes, signed by Morelli and Ehsan as comakers.
During the latter part of 1983, the partners began to have a falling out, and in January 1985, Morelli petitioned the court for a dissolution of the partnership and an accounting. Ehsan moved to dismiss Morelli's complaint, arguing that the partnership agreement was illegal and void.
The trial court granted summary judgment for Ehsan, holding that Morelli's participation in the partnership constituted the unlicensed practice of medicine in violation of former RCW 18.71.020, and as a result, he had no legally cognizable interest in the assets, profits or management of the clinic. The court permanently enjoined Morelli from interfering in any way in the operation of the clinic. Ehsan was ordered to assume all the assets and liabilities of the business, but was held not to be liable for any of the funds contributed by Morelli to the partnership....
(Footnotes omitted.) Morelli v. Ehsan, 48 Wn. App. 14, 15-16, 737 P.2d 1030 (1987).
Tito and Diana Morelli (Morelli) appealed to the Court of Appeals, which held the partnership agreement was illegal, but remanded the case to the trial court for an accounting and distribution of the partnership assets on an equitable basis. We affirm in part and reverse in part.

I
Since Morelli's claims were dismissed on summary judgment, we engage in the same inquiry as the trial court. *558 Hontz v. State, 105 Wn.2d 302, 311, 714 P.2d 1176 (1986). Summary judgment should be granted when
the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law....
CR 56(c); Hontz, at 311.
Because the trial court granted summary judgment against Morelli, the nonmoving party, all evidence and reasonable inferences therefrom are to be considered in his favor. Hontz, at 311; Wilson v. Steinbach, 98 Wn.2d 434, 437, 656 P.2d 1030 (1982).
In challenging Ehsan's motion for summary judgment, Morelli contends the partnership was legal because his responsibilities and duties were limited strictly to business aspects while Ehsan's authority was limited to the clinic's medical affairs. Morelli recites facts which he claims support this view. However, the legality of a partnership to practice medicine is not a matter of fact. It is a question of law, which is addressed by both the statutory and common law of Washington.
At the time of the partnership formation, former RCW 18.71.020 provided:
Any person who shall practice or attempt to practice or hold himself out as practicing medicine .. . without ... a valid ... license ... shall be guilty of a gross misdemeanor ...
The practice of medicine is defined in RCW 18.71.011(1) as anyone who
Offers or undertakes to diagnose, cure, advise or prescribe for any human disease, ailment, injury, infirmity, deformity, pain or other condition, physical or mental ... by any means or instrumentality ...
(Italics ours.)
[1] Under The Professional Service Corporation Act, RCW 18.100, lawyers, doctors, dentists, optometrists, and other professional specialists are authorized to form a *559 corporate entity within their respective practices. However, the corporation must be organized by "[a]n individual or group of individuals duly licensed ... to render the same professional services ..." RCW 18.100.050. Additionally, under RCW 18.100.080, "[n]o professional service corporation ... shall engage in any business other than the rendering of the professional services for which it was incorporated ..." The intent of the Legislature to bar other than similarly licensed health care professionals from involvement in professional services is amply delineated.
Under the common law, this court also has recognized the practice of law, medicine, dentistry, and optometry as learned professions which affect the public health and welfare. State v. Boren, 36 Wn.2d 522, 219 P.2d 566, 20 A.L.R.2d 798, appeal dismissed, 340 U.S. 881 (1950); State ex rel. Standard Optical Co. v. Superior Court, 17 Wn.2d 323, 135 P.2d 839 (1943); cf. Prichard v. Conway, 39 Wn.2d 117, 234 P.2d 872 (1951).
In Standard Optical, we found a corporation was practicing optometry, even though it was not exercising any "control over the professional judgment of the optometrist" in his practice. Standard, at 326. The corporation's only involvement was limited to renting the space and advertising for the optometrist. We held that "neither a corporation nor any unlicensed person or entity may engage, through licensed employees, in the practice of the learned professions ..." Standard Optical, at 328.
In State v. Boren, supra, we relied on a statute which stated a person practices dentistry "`who owns, maintains or operates an office for the practice of dentistry.'" Boren, at 532. The same definition is found in the present successor statute, RCW 18.32.020(3). In Boren, two unlicensed partners, through a licensed dentist, owned and operated a dental office. The two unlicensed businessmen attempted to make their transaction look legitimate under the guise of a conditional sales contract. As in Standard Optical, the Boren court reiterated the general rule that "no unlicensed person or entity may engage in the practice of medicine, *560 surgery, or dentistry through licensed employees." Boren, at 531.
Morelli objects to the application of these statutes and cases to this partnership agreement and refers us to Prichard v. Conway, supra. In that case Mrs. Conway, a widow, sold her deceased husband's dental practice to Dr. Prichard, a licensed dentist. Because Dr. Prichard could not afford to make the necessary down payment, they entered into a conditional sales agreement. Examining the agreement in light of the Boren decision, the court found no violation of the public policy.
The fact that Mrs. Conway was to have a relatively large percentage of the net profits during the first five years does not establish that she owns, maintains, or operates an office for the practice of dentistry, but, rather, that she and Dr. Prichard had agreed upon a formula for arriving at a value of the "going business," which we conceive to be the good will of the established dental practice.
Prichard v. Conway, supra at 121.
Morelli was not similarly situated. He was in a general partnership with a physician as an equal partner. While Morelli asserts his only duties were as business manager, the evidence is to the contrary. The partnership agreement clearly establishes Morelli as more than a business manager of the clinic. He was a general partner entitled to equal share of the profits, to equal rights in the management, to hire nurses, and to all the rights and duties of a general partner under the laws of the state of Washington. Furthermore, the record indicates Morelli exercised those rights.
Morelli argues that the Legislature in defining the practice of medicine (RCW 18.71.011(1)) did not expressly include the ownership, maintenance, or operation of an office as it did in defining the practice of dentistry (RCW 18.32.020). While this is so, we concur with the comment of the Court of Appeals: "[I]t would be incongruent to conclude that the Legislature intended to single out the dental *561 profession within which to proscribe a particular form of `unlicensed practice'." Morelli v. Ehsan, supra at 19.
Morelli also contends The Professional Service Corporation Act indicates the Legislature did not intend to prevent lay participation in a professional partnership. We disagree. The Professional Service Corporation Act is a narrow statutory exception to the common law rule that a corporation cannot engage in the practice of a learned profession through licensed employees unless legislatively authorized. Standard Optical Co. v. Superior Court, supra. As the Court of Appeals observed: "It would be anomalous if, by simply structuring an organization as a limited partnership, rather than a corporation, lay businessmen could participate in a business that provided the same professional services." Morelli v. Ehsan, supra at 20. See AGLO 18 (1980).
Additionally, the partnership agreement under section 14, "Death of General Partner", provides for either partner to bequeath his partnership interest to anyone in the event of his death. There is no mention of licensing qualifications. Arguably, upon Ehsan's death, a nonphysician could replace him, unlawfully placing control of the medical clinic with partners not licensed to practice medicine.
The Sunrise Emergency and Family Care Clinic partnership agreement provided Morelli a means and an instrumentality by which he shared equally in the profits and management of a medical practice. Both Morelli and Ehsan were violating statutes governing the practice of their respective professions by operating a medical clinic without both being licensed as physicians. The partnership agreement was illegal as a matter of law.

II
Having found the partnership agreement illegal, we next address whether the trial court properly precluded Morelli from an equitable distribution of the assets.
[2] If the business of a partnership is illegal, we will not entertain an action for an accounting and distribution of the assets, Brower v. Johnson, 56 Wn.2d 321, 325, 352 P.2d *562 814 (1960), especially when the unlawful agreement is contrary to public policy. Red Devil Fireworks Co. v. Siddle, 32 Wn. App. 521, 526, 648 P.2d 468 (1982). This is consistent with the general rule that illegal agreements are void, and courts will not enforce them. Brower v. Johnson, supra; Williams v. Burrus, 20 Wn. App. 494, 497, 581 P.2d 164 (1978); 17 Am.Jur.2d Contracts § 216, at 584-85 (1964). The parties are left where the court finds them regardless of whether the situation is unequal as to the parties. Sherwood & Roberts  Yakima, Inc. v. Leach, 67 Wn.2d 630, 637, 409 P.2d 160, 14 A.L.R.3d 1411 (1965); Hederman v. George, 35 Wn.2d 357, 361, 212 P.2d 841 (1949). If the parties are not in pari delicto, however, the less culpable party may maintain an action based on an illegal contract. Sherwood & Roberts  Yakima, Inc. v. Leach, supra; see also Golberg v. Sanglier, 96 Wn.2d 874, 883, 639 P.2d 1347, 647 P.2d 489 (1982).
In the present case, undisputed evidence indicated neither party entered into the transaction with any knowledge the partnership agreement was illegal. Furthermore, neither party had an illegal intent to form or conduct an illegal business partnership. Nevertheless, the partnership was illegal; good faith intentions do not excuse either party from knowing the law. Cf. Golberg v. Sanglier, supra; St. John Farms, Inc. v. D.J. Irvin Co., 25 Wn. App. 802, 609 P.2d 970, review denied, 94 Wn.2d 1002 (1980).
In remanding for an accounting, the Court of Appeals fashioned a "good faith" exception, a new and unprecedented exception to the general rule that the courts will not enforce an illegal agreement where both parties are equally at fault, but will leave the parties where it found them. This exception, apparently effective when both parties believe they were acting within the law, completely undermines the purpose of the rule  deterrence. There is no deterrence from violating a law if parties may claim both were ignorant of the law. In an Arizona case similar to the one before the court, Graham v. Shooke, 107 Ariz. 79, 482 P.2d 446 (1971), Shooke claimed to be a partner with Dr. *563 Graham in a veterinary clinic. Shooke was not licensed to practice veterinary medicine. The Arizona Supreme Court held that "an accounting will not be granted where the subject matter of the partnership is illegal, and the partners are ... equally at fault." Graham v. Shooke, supra at 80.
By denying Morelli an accounting, the trial court followed the law in this jurisdiction and others leaving the parties where it found them. If the court had granted Morelli affirmative relief, as ordered by the Court of Appeals on remand, the parties would be using the court to enforce their illegal partnership agreement. Instead, after finding the agreement illegal, the trial court enjoined Morelli from entering the clinic to prevent his continued participation in the practice of medicine. The court further ordered Ehsan, as the only person authorized to practice medicine, to assume sole liability for all past, present, and contingent liabilities of the clinic. Whether Ehsan continued to practice medicine in the clinic building or go elsewhere, he was still responsible for all liabilities associated with the illegal partnership practice. Ehsan has not appealed from this order. While the order relieved Morelli of any liabilities, it also denied Morelli any recovery from his investment in the illegal partnership.
The trial court found the agreement illegal and issued orders to that effect. Had the trial court simply found the partnership illegal without issuing orders from the finding, both Morelli and Ehsan could then attempt to use the courts to resolve the very points addressed by the court's orders. Not only would this be an inefficient use of judicial resources, it would force another court to make a finding upon the result of their illegal agreement. By enjoining Morelli, the court was assured of no further participation by Morelli in the clinic or possible breach of the peace as Ehsan tried to restrain Morelli from interfering with his practice of medicine. The trial court's orders correctly followed the law by leaving the parties where it found them.
[3] Finally, Morelli contends that even if an accounting is denied, the court should enforce the promissory notes *564 because they were separate advances to the partnership after its formation. Because the promissory notes were advanced by Morelli, a general partner, in the operation and furtherance of the illegal partnership, allowing Morelli to enforce them would, in effect, sanction the illegal partnership and allow the enforcement of an illegal agreement. See Baugh v. Dunstan & Dunstan, Inc., 67 Wn.2d 710, 409 P.2d 658 (1966) (promissory note furnished direct connection with illegal transaction). The trial court correctly denied Morelli any contribution from Ehsan for the promissory notes.
To the extent both Morelli and Ehsan violated the law by participating in the illegal partnership, equal fault does exist. The trial court's judgment was correct in finding the partnership agreement illegal and denying an accounting of the partnership.
The Court of Appeals is partly affirmed and partly reversed, and the judgment of the trial court is reinstated.
PEARSON, C.J., and UTTER, BRACHTENBACH, DORE, ANDERSEN, CALLOW, GOODLOE, and DURHAM, JJ., concur.
