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.

526 B
Raw Blame
using Grand.Mapping.Internal;

namespace Grand.Mapping;

public abstract class Profile
{
    private readonly List<IMappingConfiguration> _configurations = new();

    protected IMappingExpression<TSource, TDest> CreateMap<TSource, TDest>() where TDest : new()
    {
        var expr = new MappingExpressionImpl<TSource, TDest>();
        _configurations.Add(new MappingConfiguration<TSource, TDest>(expr));
        return expr;
    }

    internal IEnumerable<IMappingConfiguration> GetConfigurations() => _configurations;
}