Is it possible to cast/convert an IContent to IPublishedContent or a Model's builder model inside a ContentService's hook?
More specifically, I am using the Saving hook as you can see below. Reference for the hook: https://our.umbraco.com/documentation/reference/events/contentservice-events
Problem is that content variable is an IContent type and I can't cast it.
Relevant code of mine which returns variable "question" as null:
private void ContentService_Saving(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.ContentSavingEventArgs e)
{
foreach (var content in e.SavedEntities)
{
var documentType = content.ContentType.Alias;
var question = content as IPublishedContent;
}
}