Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

641 B
Raw Blame
using Grand.Domain.Pages;
using Grand.Infrastructure.Mapper;
using Grand.Web.AdminShared.Models.Layouts;

namespace Grand.Web.AdminShared.Extensions.Mapping.Layouts;

public static class PageLayoutMappingExtensions
{
    public static PageLayoutModel ToModel(this PageLayout entity)
    {
        return entity.MapTo<PageLayout, PageLayoutModel>();
    }

    public static PageLayout ToEntity(this PageLayoutModel model)
    {
        return model.MapTo<PageLayoutModel, PageLayout>();
    }

    public static PageLayout ToEntity(this PageLayoutModel model, PageLayout destination)
    {
        return model.MapTo(destination);
    }
}