We show that for an even-dimensional hypercubic lattice one can modify the construction of a dual lattice to have the correspondence edge-edge instead of the conventional correspondence edge-(d-1)-dimensional face. This gives a straightforward generalization of Kramers-Wannier duality for an even-dimensional Ising model. In the same way as the partition function for the 2D Ising model is related to a sum over paths on a torus, higher-dimensional models involve sums over paths on Riemannian surfaces of higher genus. The critical temperature can be located only in the d=2 case in which all topological effects disappear from the thermodynamic limit. The duality in higher dimensions, however, being weak, leads nevertheless to some interesting relations for sums over paths on Riemannian surfaces, which can be considered as a topological characteristic of a critical point.