Adding repository factory to create the repository.
Adjusting non-atomic unit of work to use repository_factory.