src/User/Controller/RestController.php
public function getEntityManager()
    {
        if (null === $this->em) {
			$mainService = $this->getServiceLocator()->get('neobazaar.service.main');
            $this->em = $mainService->getEntityManager();
        }
        return $this->em;
    }
public function getEntityManager()
    {
        if (null === $this->em) {
			$mainService = $this->getServiceLocator()->get('neobazaar.service.main');
            $this->em = $mainService->getEntityManager();
        }
        return $this->em;
    }
Get doctrine default entity manager

@return \Document\Controller\Doctrine\ORM\EntityManager