entity manager base