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.

661 B
Raw Blame
using Grand.Domain.Messages;
using Grand.Infrastructure.Mapper;
using Grand.Web.AdminShared.Models.Messages;

namespace Grand.Web.AdminShared.Extensions.Mapping;

public static class EmailAccountMappingExtensions
{
    public static EmailAccountModel ToModel(this EmailAccount entity)
    {
        return entity.MapTo<EmailAccount, EmailAccountModel>();
    }

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

    public static EmailAccount ToEntity(this EmailAccountModel model, EmailAccount destination)
    {
        return model.MapTo(destination);
    }
}