You might wonder, with an entity name, or a selection set of entities, if there is a way in to determine if any entities have been deleted so that they can be undeleted.
In AutoLISP, call entget on each entity name in the selection set. If the entity has been erased since the creation of the set, it will not return any entity data. Then call entdel to undelete the entity.
In ObjectARX, the AcDbObject::erase() method allows you to set or unset the erase bit of an object. You may also call acdbEntDel to undelete the entity.