Changed DefaultRepository to check for the read-only state of the parent UnitOfWork before attempting add or delete operations.