SAN FRANCISCO Evan Longoria hit a three-run homer in the first inning and Ty Blach made the early lead stand up, pitching the San Francisco Giants past the Los Angeles Dodgers 4-2 Sunday.