[service] refactoring entity manager