*7Deborah Brittian Hildebran ("Plaintiff"), on behalf of the Estate of James George Hildebran (the "Estate"), appeals from an order dismissing her action for a declaratory judgment and denying her motion for summary judgment. For the following reasons, we reverse that portion of the order dismissing her declaratory judgment action and vacate that portion of the order denying her motion for summary judgment.
This proceeding is a declaratory judgment action filed in superior court concerning the rights of the parties under a will (the "Will") executed by James George Brittian ("Testator"), now deceased-a will that has been accepted for probate in a separate proceeding before the clerk.
Prior to Testator's death, he executed the Will, naming his daughter (Plaintiff) as executrix, and gave the Will to her for safekeeping. The Will left the property in his estate to various beneficiaries. The Will contained a number of markings, one of which struck through the name of Testator's granddaughter, Chanté Fare Brittian (the "Granddaughter").
The Will was probated in common form before the clerk and letters testamentary were issued appointing Plaintiff as executrix. However, an assistant clerk in the Estates Division wrote a letter to Plaintiff to inform her that personnel in the Estates Division had been able "to read *8the blacked out sections on the original version [of the Will] and ha[d] typed up the sections from the original Will," and that "any modification by strike-outs, additions to and/or interlineations [were] not valid for purposes of probate," essentially taking the position that the apparent partial revocation of the Will disinheriting the Granddaughter was ineffective. Attached to this letter was a document typed up by personnel in the clerk's office which reproduced the language in the Will which had been marked through.
Plaintiff responded by letter through counsel, stating her position that the partial revocation *870was effective. However, in response to Plaintiff's letter, the assistant clerk wrote to Plaintiff advising her that it was in her best interest to file an action for a declaratory judgment, stating that "[a] ruling on this issue from a Superior Court Judge would clarify the matter."
Thereafter, Plaintiff instituted the present action for a declaratory judgment. The Granddaughter answered, moving to dismiss the action pursuant to Rule 12(b)(6) of our Rules of Civil Procedure for failure to state a claim upon which relief can be granted, or, in the alternative, asserting that the partial revocation of the Will was ineffective.
Plaintiff then moved for summary judgment. The Granddaughter responded to Plaintiff's summary judgment motion, asserting, inter alia, that Plaintiff was objecting to a duly admitted will in probate and that, therefore, Plaintiff was required to file a caveat in the probate proceeding before the clerk rather than through a declaratory judgment action in superior court.
After a hearing on the matter, the superior court entered an order granting the Granddaughter's Rule 12(b)(6) motion, and further denying Plaintiff's motion for summary judgment. Plaintiff entered timely notice of appeal.
A. Granddaughter's Rule 12(b)(6) Motion
Plaintiff first argues that the trial court erred in granting the Granddaughter's Rule 12(b)(6) motion to dismiss. Specifically, Plaintiff contends that where the construction -rather than the validity -of a will is contested, the appropriate procedure for obtaining a declaration of the rights of the parties under that will is an action for a declaratory judgment, not a caveat proceeding. We agree.
*9Our Supreme Court has held that the construction of a will presents "a proper justiciable question ... under the provisions of the North Carolina Declaratory Judgment Act." Johnson v. Wagner, 219 N.C. 235, 238, 13 S.E.2d 419, 421 (1941). That Act, as codified in relevant part in N.C. Gen.Stat. § 1-254, provides that "[a]ny person interested under a ... will ... may have determined any question of construction ... arising under the instrument ... and obtain a declaration of rights, status, or other legal relations thereunder." N.C. Gen.Stat. § 1-254 (2014). Thus, any interested party under a will may bring an action for a declaratory judgment, see Taylor v. Taylor, 301 N.C. 357, 364, 271 S.E.2d 506, 511 (1980), including the executor of the estate, see First Sec. Trust Co. v. Henderson, 226 N.C. 649, 651, 39 S.E.2d 804, 805 (1946).
By contrast, a caveat proceeding is the method by which a writing offered for probate and purporting to be a will is challenged. Rogel v. Johnson, 114 N.C.App. 239, 241, 441 S.E.2d 558, 560 (1994). As our Supreme Court has explained,
[w]hen a paper writing purporting to be a will is presented to the Judge of Probate he takes proof with respect to its execution. If found in order the script is admitted to probate in common form as a will.... It stands as the testator's will, and his only will, until challenged and reversed in a proper proceeding before a competent tribunal. The challenge must be by caveat and be heard in the Superior Court.
In re Charles's Will, 263 N.C. 411, 415, 139 S.E.2d 588, 591 (1965) (emphasis in original) (internal citation omitted). See also N.C. Gen.Stat. § 31-32(a) (2014) ("At the time of application for probate of any will, ... any party interested in the estate, may ... enter a caveat to the probate of such will"). Unlike a declaratory judgment action, "[t]he purpose of a caveat is to determine whether the paperwriting purporting to be a will is in fact the last will and testament of the person for whom it is propounded." In re Spinks's Will, 7 N.C.App. 417, 423, 173 S.E.2d 1, 5 (1970). Thus, while the issue of whether a contested writing is the valid will of the testator may only be challenged by caveat, *871where the construction of an unchallenged will1 is contested, an action for a *10declaratory judgment is the appropriate procedure for determining the rights of the parties under that will. Compare id. with Taylor, 301 N.C. at 364, 271 S.E.2d at 511.
The trial court in the present case, however, appears to have mistakenly concluded that Plaintiff was challenging the Will itself rather than seeking a judicial resolution of the rights of the parties under the terms of the Will and the effect of the markings thereon on these parties' rights. Therefore, the court's dismissal of Plaintiff's action on this basis was error.
B. Plaintiff's Summary Judgment Motion
The trial court, after granting the Granddaughter's Rule 12(b)(6) motion, purported in its order to deny Plaintiff's summary judgment motion, which Plaintiff also argues was erroneous. Specifically, Plaintiff points out that the trial court's basis for denying her summary judgment motion is unclear, as it was denied rather than dismissed as moot, and there is no indication in the order whether the court considered evidence outside the pleadings in reaching the conclusion that the motion should be denied. However, upon concluding, albeit erroneously, that Plaintiff had failed to state a claim upon which relief could be granted, the trial court no longer had any claim before it with respect to which it could conclude whether summary judgment was or was not appropriate. Therefore, the trial court's purported denial of Plaintiff's motion for summary judgment after it dismissed Plaintiff's only claim as legally insufficient was void ab initio.
Our Supreme Court has long recognized that "[t]he only purpose of a Rule 12(b)(6) motion is to test the legal sufficiency of the pleading against which it is directed." White v. White, 296 N.C. 661, 667, 252 S.E.2d 698, 702 (1979). Therefore, where "a trial court dismisses a claim under Rule 12(b)(6) for failure to state a claim for relief, that dismissal operates as an adjudication on the merits unless the court specifies that the dismissal is without prejudice." Cnty. of Durham v. Daye, 195 N.C.App. 527, 532, 673 S.E.2d 683, 687 (2009) (internal marks omitted).
However, unlike a motion to dismiss under Rule 12(b)(6), the purpose of summary judgment under Rule 56 is not to test the legal sufficiency of the pleadings, but rather, in reviewing evidentiary material from outside the pleadings, "to provide an efficient method for determining whether a material issue of fact actually exists." Southerland v. Kapp, 59 N.C.App. 94, 95, 295 S.E.2d 602, 603 (1982). Thus, "[t]he distinction between a Rule 12(b)(6) motion to dismiss and a motion for summary judgment is [ ] more than a mere technicality." Locus v. Fayetteville State *11Univ., 102 N.C.App. 522, 527, 402 S.E.2d 862, 866 (1991). Accordingly, the denial of a motion to dismiss under Rule 12(b)(6) does not subsequently prevent a court from granting summary judgment under Rule 56. Barbour v. Little, 37 N.C.App. 686, 692, 247 S.E.2d 252, 255-56 (1978).
However, the converse does not hold. That is, once a court grants a motion under Rule 12(b)(6), dismissing the claim with prejudice, "the dismissal operates as an adjudication on the merits [.]" Daye, 195 N.C.App. at 532, 673 S.E.2d at 687. After concluding that the pleadings are legally insufficient to state a valid claim for relief, a court cannot then adjudicate whether there is a genuine issue of material fact and the movant is entitled to judgment as a matter of law on that very same claim because the court has already concluded the asserted claim, as a matter of law, is no claim at all. See id. Therefore, on remand, the trial court must disregard the purported denial of Plaintiff's motion for summary judgment because *872this denial was and is a nullity.2
We reverse the portion of the trial court's order dismissing Plaintiff's claim for a declaratory judgment pursuant to Rule 12(b)(6). Furthermore, we vacate that portion of the trial court's order denying Plaintiff's motion for summary judgment. On remand, the trial court must determine the rights of the parties under the terms of the Will, including the effect of any partial revocations thereof on the parties' rights under the Will.
REVERSED AND REMANDED IN PART, AND VACATED IN PART.
Judges CALABRIA and ELMORE concur.