Last Activity: 4 months ago
ICleanable Interface to clean up after module delete
Your idea has been submitted and is awaiting moderation.
DNN has long been missing a standard method to clean up after a module has been removed form the website. The current way of cleaning up data is to hack the DB with a foreign key or a trigger, this only gives limited control and is not ideal.
I suggest a Interface is created to work much the same as the IPortable and ISearchable, but which will be triggered on delete of the module instance from the websites. The recycle bin should also be dealt with by use of a soft lock and a restore event.
1 proposed solution would be :
public interface ICleanable
string DeleteModule(int portalId, int moduleId, bool softDelete);
string RestoreModule(int portalId, int moduleId);