Two years seems pretty extraordinary to have a corroded through water heater. You mentioned it was a Dometic branded unit. I believe that is what used to be an Atwood water heater. Dometic purchased Atwood a few years back. Historically, Atwood used glass-lined tanks. As such, they didn't "need" a sacrificial anode rod like the Subrban water heaters do.
Do you know if you have a plastic drain plug in this water heater or an anode rod? If it has an anode rod, using a 1-1/16" socket, pull it out and let's see what it looks like. If there's just a wire left and no anode material (magnesium or aluminum - typically), that's the issue that allowed the corrosion of the tank.
If this is a no-anode rod model, I'd consider contacting Dometic Customer Service to check on warranty for the unit.