I'm new to Orchard CMS and C# development. I'm trying to create my own News Module.
The module injects a few MenuItems into the AdminMenu and provides functionality to manage site news.
I've created a NewsItem
document type, which consists of TitlePart
, BodyPart
and my own NewsPart
.
NewsPart
is based on NewsPartRecord
which holds 2 extra string fields SourceTitle
and SourceUrl
.
I am faced with the problem that I can't remove entirely my content items. ContentManager.Remove(id)
just marks the item version as latest = false
and hides it. But I don't need to store old versions and any backups for my document items. It is like a garbage in the DB.
Using the OnRemove
event in my NewsPartHandler
affects only the newsPartRecord
table, and other parts like TitlePart
, BodyPart
and item data and versions are still present in database.
How do I fully remove ContentItem
data?