You've created recursive loop, probably by accident.
With:
wherePredicate = i=> wherePredicate(i) || wherePredicate2(i);
you are just defining anonymous function in which i=> wherePredicate(i) (...)
will be invoked, so it will invoke itself. The common rule like "everything on right side of '=' will be called before assignment" do not apply there as you might have thought, because a function it's what gets assigned, not its result.
What's more (you tagged Entity Framework) - it won't work in .Where()
clause. Short answer - EF do not know how to invoke Func<>
in database.
Long answer - see LINQKit which will help you in defining reusable predicates. Strange coincidance - your problem is almost literally explained in "combining-expressions" section.