Throws InvalidOperationException if you try to do
repository.GetById with version <= 0