public function deleteCode(Entity $userCode)
    {
        $entityManager = $this->entityManager;
        $entityManager->remove($userCode);
        $entityManager->flush();
    }
public function deleteCode(Entity $userCode)
    {
        $entityManager = $this->entityManager;
        $entityManager->remove($userCode);
        $entityManager->flush();
    }
public function deleteCode ( Entity $ userCode ) { $ entityManager = $ this -> entityManager ; $ entityManager -> remove ( $ userCode ) ; $ entityManager -> flush ( ) ; }
delete a userCode from database

@param Entity $userCode
delete a userCode from database