Turnout was low. Despite the big media buys, it was a nearly invisible primary, following sweeping and unnecessary changes in the district, posting a three-way contest between two still fresh incumbents and an under-funded (but semi-credible challenger) over a lot of new territory.
I'll bet Holding's donors spent a record-breaking price for each vote, and Elmers built up a considerable amount of ill-will since beating a particularly nasty old guard liberal and establishment Democrat a few years back, since then pissing off her base on illegal immigration, clearly placing the Chambers of Communists along the Potomac ahead of the folks back home.
She probably begged Trump to endorse her, and he had political coin to spare. It won't hurt him.
Still, the low turnout was the biggest factor, and the reasons for that had nothing to do with Trump and everything to do with judge shopping by NC Democrats and a judiciary, in this case, with no respect for the letter of the law or for the convenience of voters.