wired up entity manager when passing client in constructor