Another way this is noted is that Factories are “pure domain”, but that Repositories can contain links to the infrastructure, e g the database.

DDD Quickly
from UnknownAuthor 📕