It's exceptionally rare for an incumbent Senator to lose to a challenger when the Presidential candidate who wins that state is from the same party. The last time this happened was 2008 in Alaska, 11 days after Ted "Series of Tubes" Stevens was convicted and running to become the first convicted felon to win an Election for the Senate. He lost by 1 point.
You need a quality, well-known opponent, an incumbent who's embroiled in scandal, solid funding and what winds up being a closer than expected win for the guy at the top. It also helps to have a state with a fairly indepedent streak like Alaska or Montana (Bullock). Those things are all present here. But Dems should still temper their expectations a bit when considering how these two races would have to buck historical trends. If Trump wins them by just 4-6 points, the challengers may be able to eek it out, but anything more than that and the incumbents will likely ride the coattails and hang on. Same is true of Ernst although Iowa is much more a pure toss up.
But it's pretty clear that Graham's image is pretty badly tarnished, so Trump will do better than him in the state as a whole.