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.

464 B
Raw Blame
namespace Grand.Infrastructure.Mapper;

public static class MappingExtensions
{
    public static TDestination MapTo<TSource, TDestination>(this TSource source) where TDestination : new()
    {
        return AutoMapperConfig.Mapper.Map<TSource, TDestination>(source);
    }

    public static TDestination MapTo<TSource, TDestination>(this TSource source, TDestination destination)
    {
        return AutoMapperConfig.Mapper.Map(source, destination);
    }
}