Trevor Bauer earned his first major league victory and Paul Goldschmidt knocked in four runs as the Diamondbacks downed the Dodgers, 7-1, in the finale of a four-game series.

Bauer (1-1), who gave up seven runs -- six earned -- in his last start, rebounded to hold the Dodgers scoreless over six frames while allowing only two hits. He struck out six and walked one, after walking seven in his first 7 1/3 innings in the big leagues.

"He really got rolling there after about the third inning," Arizona manager Kirk Gibson said. "His pitch count got up, I probably wasn't going to let him get over 105, so we removed him at the time and he had a good, successful start and was in good position to get his first win."

"You can tell he's got command of three pitches," Dodgers third baseman Jerry Hairston said. "For a young guy, it's kind of rare. He's got a really good fastball, and his changeup's pretty good and obviously his slider, curveball. So he pitched well today, give him credit."

Bauer improved throughout the day. After allowing leadoff doubles in the second and third innings, he retired 12 straight hitters to shut down Los Angeles.

Goldschmidt picked up a pair of hits, including a double, to help Arizona wrap up the first half of the season with three straight wins.

Justin Upton, surrounded by trade talk, also excelled for the Diamondbacks, coming up a homer short of the cycle and scoring three runs.

Chris Capuano (9-4) surrendered five runs on nine hits and a walk over five innings to absorb the loss for the Dodgers.

Upton put the Diamondbacks ahead early. After Willie Bloomquist led off the first with a base hit, Upton drove him home with a triple to the right-field corner. Two batters later, Goldschmidt crushed a two-out double to right- center field to plate a second run.

Goldschmidt knocked in three more runs in the fifth when he belted an 0-1 sinker out to left-center, scoring Upton and Jason Kubel and giving Arizona a five-run lead.

"It was frustrating," Capuano said. "I feel like I pitched my way through the game pretty well to that point to kind of let it get away from me."

Miguel Montero capped the Diamondbacks scoring in the seventh inning with a two-run single. Aaron Hill singled, Upton doubled and Kubel walked to load the bases. Two batters later, Montero lined a single to left-center field.

The Dodgers' first three hitters reached base in the ninth inning, but Los Angeles only knocked in one on a sacrifice fly from Juan Uribe and Patrick Corbin earned his first career save, holding the Dodgers to one run in three innings.

Game Notes

The Diamondbacks are 13-5 in their last 18 home games...Upton has hit safely in nine games against the Dodgers this season (.400, 14-for-35)...Bloomquist, who went 1-for-5, has picked up a hit in nine of his last 10 games against the Dodgers...Hill, who went 1-for-5, has picked up a hit in 22 of his last 23 home games...The Dodgers enter the All-Star Break with a winning record for the 10th team in the last 13 seasons with a 47-40 record, a 1/2 game ahead of San Francisco for the best record in the National League West...The Diamondbacks finish the first half 42-43, four games back of the Dodgers...Los Angeles went 1-for-9 with runners in scoring position and stranded seven...Arizona went 3-for-11 with runners in scoring position and left seven on base.