public function create($className, $data, ClassMetadataInterface $metadata = null)
    {
        $repo = $this->getRepository($className);

        return $repo->create($data, $metadata);
    }
public function create($className, $data, ClassMetadataInterface $metadata = null)
    {
        $repo = $this->getRepository($className);

        return $repo->create($data, $metadata);
    }
public function create ( $ className , $ data , ClassMetadataInterface $ metadata = null ) { $ repo = $ this -> getRepository ( $ className ) ; return $ repo -> create ( $ data , $ metadata ) ; }
Creates an entity of the given class, with the data supplied.

@param string                 $className The type of entity to create
@param array                  $data      The data to use to hydrate the new entity
@param ClassMetadataInterface $metadata

@throws InvalidRepositoryException

@return Entity\Entity
Creates an entity of the given class with the data supplied .