Refactor UnitOfWork::Insert for making use of the best key.