Invariant submanifods of some classes of contact and of paracontact metric manifolds