src/Entity/Factory/EntityFactory.php
public function create(string $entityFqn, DataTransferObjectInterface $dto = null)
    {
        $this->assertEntityManagerSet();

        return $this->createEntity($entityFqn, $dto, true);
    }
public function create(string $entityFqn, DataTransferObjectInterface $dto = null)
    {
        $this->assertEntityManagerSet();

        return $this->createEntity($entityFqn, $dto, true);
    }
public function create ( string $ entityFqn , DataTransferObjectInterface $ dto = null ) { $ this -> assertEntityManagerSet ( ) ; return $ this -> createEntity ( $ entityFqn , $ dto , true ) ; }
Build a new entity, optionally pass in a DTO to provide the data that should be used

Optionally pass in an array of property=>value

@param string                           $entityFqn

@param DataTransferObjectInterface|null $dto

@return mixed
@throws MultipleValidationException
@throws ValidationException
Build a new entity optionally pass in a DTO to provide the data that should be used