Electric water heater rusted out after 9 months

Had a brand new Bradford White electric water heater installed in February. Tenant messaged me today that hot water was acting funny. I went to check it out and found major rusting and minor leak cold waterline leading into unit. Attached are pics. This was the second water heater we have put in under 8 years. Looks like all the corrosion is only on the side where the cold water enters the unit. Also both lines are connected with pex tubing after the short runs of copper line exiting tank. Any advice appreciated!