OPINION
| MATTHEWS, Chief Justice.I. INTRODUCTION
Peter and Nancy Hutton purchased real estate in February 1992. In February 1997 they discovered that the real estate violated zoning laws. They filed suit against the seller's listing agents in January 1999. The trial court dismissed the complaint on statute of limitations grounds. The Huttons appeal. Because the issue of when the Huttons should have known of the zoning problem is a question of fact, we reverse and remand.
II. FACTS AND PROCEEDINGS
In February 1992 Peter and Nancy Hutton purchased a nine-unit income property from the State of Alaska.1 Realty Executives, Inc., (formerly HRT Real Estate, Inc.) and Curtis L. Nading (collectively Realty) were the state's listing agents responsible for the sale. Realty represented to the Huttons that the property was a nine-unit apartment complex. The Huttons do not claim that Realty made any representations regarding how the property was zoned.
In February 1997 the Huttons attempted to refinance the property through Northrim Bank. Northrim Bank had an independent appraisal performed. The appraisal showed that the nine-unit complex violated Anchorage zoning regulations, which permitted only eight units on their lot.2 Because the property violated zoning laws, Northrim Bank denied the Huttons' application for refinane-ing. The Municipality of Anchorage denied the Huttons' request for a variance and ordered the Huttons to convert the property into an eight-unit complex to comply with zoning laws. The Huttons sold the property in 1998 at a loss.
On January 20, 1999, the Huttons filed suit against Realty, alleging negligent misrepresentation and a breach of its professional duty to inform the Huttons of the property's zoning problems. Realty moved to dismiss on statute of limitations grounds, as seven years had passed since the sale of the property. The trial court granted the motion to dismiss in July 1999. The Huttons appeal.
III. STANDARD OF REVIEW
We review an order dismissing a complaint for failure to state a claim de novos.3 "If, within the framework of the complaint, evidence may be introduced which will sustain a grant of relief to the plaintiff, the complaint is sufficient." 4 The failure to file a complaint within the statute of limitations is grounds for a Civil Rule 12(b)(6) motion to dismiss.5
IV. DISCUSSION
The Huttons argue that the trial court incorrectly applied the statutes of limitations, in violation of the discovery rule.6 Realty argues that the Huttons are charged with constructive knowledge of the zoning laws as of the date of purchase of the property, thus the statutes of limitations bar this suit.
The Huttons' claim of negligent misrepresentation is a tort claim, subject to a *980two-year statute of limitations.7 The claim of breach of professional duty arises in part from contract and, because the Huttons' cause of action acerued before April 7, 1997, is governed by a six-year statute of limitations.8 As the property was sold in February 1992, and the claim was brought in January 1999, the statutes of limitations bar the Huttons' claims unless the discovery rule applies.
Under the traditional rule, a cause of action accrues at the time of the injury.9 In Greater Area Inc. v. Bookman, we adopted the discovery rule: the statute of limitations does not begin to run until the plaintiff discovers, or reasonably should discover, the existence of all the elements of his or her cause of action."10" For both causes of action, the critical question is when should the Huttons have been aware of the zoning violation?
Realty argues that the Huttons should have known of the zoning violation as of the date of the real estate purchase, because the Huttons are charged with constructive knowledge of the law. As a general rule, people are presumed to know the law."11 "This Court is not unmindful of the presumption that a person contracts with reference to the liability imposed by the law, and is presumed to have knowledge of it and to govern himself accordingly in such contracts as he may choose to make."12 !
But constructive knowledge cannot be used to bar cases arising out of a professional relationship, where plaintiffs claim that they have relied on a professional to impart the knowledge which the professional now asserts the plaintiffs should have possessed constructively. One case in which this point arose was Breck v. Moore.13 There the Moores sued their attorney for professional negligence associated with a real estate transaction.14 The attorney had not advised the Moores that there were building restrictions on the property.15 Although the restrictions were attached to the Moores' title insurance policy, which was given to the Moores soon after the closing, they did not read the restrictions.16 We affirmed the trial court's application of the discovery rule, concluding that it was reasonable for the Moores to rely on their attorney to review the documents and advise them of any restrictions, even though the documents were in their possession.17
Similarly, in Moore v. Allstate Insurance Co., we reversed a trial court's dismissal of claims against an insurance company because the discovery rule tolled the statute of limitations.18 There, Moore had purchased flood insurance that would cover the full replacement value of the house.19 However, she was ultimately awarded only forty percent of the home's value because of a provision of federal law of which she was unaware.20 We rejected the argument that, because Moore was a legal secretary in the insurance industry, she could have looked in the Federal *981Register and learned that she would not be entitled to full replacement value.21 There was no reason that Moore should have discovered her claims until she received the lower award because she was entitled to rely on her broker's representations, rather than do research on her own.22
These cases show that in situations where a plaintiff is advised by a professional such as an attorney or insurance agent, constructive knowledge will not necessarily trigger the running of a statute of limitations. In the present case, the defendants are a real estate agent and agency. They are similarly unable to use constructive knowledge as a matter of law as a basis to dismiss claims of misrepresentation and professional negli-genee based on a limitations defense.
The question of when the Huttons should have known of their zoning problem is one of fact, not properly resolved on a Rule 12(b)(6) motion to dismiss.
V. CONCLUSION
We hold that constructive knowledge does not, as a matter of law, bar claims for misrepresentation or breach of professional duty, where the subject of the constructive knowledge is the same subject about which the defendants allegedly had a professional duty to advise the plaintiffs. The question of when the Huttons should have known that their property was in violation of zoning laws is a factual one which needs to be decided. We therefore REVERSE the superior court's decision and REMAND for proceedings consistent with this opinion.
. All facts alleged in the complaint are accepted as true for the purposes of this appeal from an Alaska Civil Rule 12(b)(6) dismissal. See Shooshanian v. Wagner, 672 P.2d 455, 461 (Alaska 1983).
, See Anchorage Municipal Code 21.40.045 (1999).
. See Kollodge v. State, 757 P.2d 1024, 1026 n. 4 (Alaska 1988).
. Id. at 1026.
. See Toney v. City of Anchorage Police Dep't, 950 P.2d 123, 124, 126 (Alaska 1997).
. The Huttons also argue that the trial court inappropriately decided the merits of their claim. Because we reverse the trial court's decision on statute of limitations grounds, we do not address this claim.
. See AS 09.10.070(a); see also Austin v. Fulton Ins. Co., 444 P.2d 536, 539 (Alaska 1968) ("Misrepresentation and negligence are torl concepts, not contract, and the two-year statute of limitation respecting torts governs in this instance.").
. See AS 09.10.050; Lee Houston & Assocs. v. Racine, 806 P.2d 848, 854 (Alaska 1991). In 1997, AS 09.10.053 was enacted, creating a three-year statute of limitations for actions based on contract. That statute does not govern this case because it applies only to causes of action that accrue on or after August 7, 1997.
. See Pedersen v. Zielski, 822 P.2d 903, 906 (Alaska 1991).
. 657 P.2d 828, 829 (Alaska 1982).
. See Ferrell v. Baxter, 484 P.2d 250, 265 (Alaska 1971).
. Schlothan v. Einstoss, 17 Alaska 253, 262 (D.Alaska. Terr.1957) (internal quotations omitted).
. 910 P.2d 599 (Alaska 1996).
. See id. at 601.
. See id. at 602.
. See id.
. See id. at 605-06.
. 995 P.2d 231, 239 (Alaska 2000).
. See id. at 232.
. See id. at 233.
. See id. at 239.
. See id.