Levi-Civita connections for a class of spectral triples