Convertion from IpublishedContent to Custom Model using umbraco 13
I have an umbraco 8 code that will convert the ipublishedcontent to custom model, How to convert this approach to a umbraco 13?
here is my version 8 code:
public class KADUmbracoViewPageElement<T> : UmbracoViewPage<IPublishedElement> where T : class, new()
{
public override void Execute()
{
}
public override void InitHelpers()
{
base.InitHelpers();
var mapper = DependencyResolver.Current.GetService<IUmbracoMapper>();
ViewModel = new T();
mapper.Map(base.Model, ViewModel);
}
public T ViewModel { get; set; }
}
here how to call the class and convert to custom model.
@inherits KAD.Umb.Foundation.Extensions.Models.KADUmbracoViewPageElement
Can someone know how to convert this to umbraco 13?
Convertion from IpublishedContent to Custom Model using umbraco 13
I have an umbraco 8 code that will convert the ipublishedcontent to custom model, How to convert this approach to a umbraco 13?
here is my version 8 code:
here how to call the class and convert to custom model. @inherits KAD.Umb.Foundation.Extensions.Models.KADUmbracoViewPageElement
Can someone know how to convert this to umbraco 13?
is working on a reply...