Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rene M. Macalisang 7 posts 76 karma points
    Mar 06, 2024 @ 06:38
    Rene M. Macalisang
    0

    How to use IUmbracoMapper to map the ContentModel to Custom Model

    How to use IUmbracoMapper to map the ContentModel to Custom Model?

    public class HomeModel { public string Title { get; set; } public string Section { get; set; } }

    @using Umbraco.Cms.Core.Mapping @inject IUmbracoMapper _mapper; @{ Layout = "MasterLayout.cshtml";

    var data = _mapper.Map<KAD.Umb.Project.Website.Models.HomeModel>(Model);
    

    }

Please Sign in or register to post replies

Write your reply to:

Draft