Malachi Fagan-Walcott was at the double as York bounced back to beat Eastleigh 3-1 at the LNER Community Stadium.
Aaron Blair opened the scoring for the visitors in the 18th minute when he got himself on the end of a fine pass from Aaron Pierre.
Mark Kitching drew the sides level 10 minutes later, bringing the hosts to a century of goals across all competitions this season.
City took a first-time lead in the 37th minute when Fagan-Walcott headed home, and he then added another from a corner following Ollie Banks’ nod-on two minutes before the hour.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.