basic entity manager framework