code: public function getEntityManager()
      {
          if (null === $this->em) {
  			$mainService = $this->getServiceLocator()->get('neobazaar.service.main');
              $this->em = $mainService->getEntityManager();
          }
          return $this->em;
      }
docs: Get doctrine default entity manager
  
  @return \Document\Controller\Doctrine\ORM\EntityManager