public function forEntity($entityClass, DataMapperInterface $dataMapper = null)
    {
        if (empty($dataMapper)) {
            try {
                $dataMapper = $this->unitOfWork->getDataMapper($entityClass);
            } catch (\RuntimeException $e) {
                $dataMapper = $this->createDataMapper($entityClass);
            }
        }

        return new Repository($entityClass, $dataMapper, $this->unitOfWork);
    }