Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

AutoMapperConfiguration.cs

using AutoMapper;

namespace Nop.Core.Infrastructure.Mapper;

/// 
/// AutoMapper configuration
/// 
public static class AutoMapperConfiguration
{
    /// 
    /// Mapper
    /// 
    public static IMapper Mapper { get; private set; }

    /// 
    /// Mapper configuration
    /// 
    public static MapperConfiguration MapperConfiguration { get; private set; }

    /// 
    /// Initialize mapper
    /// 
    /// Mapper configuration
    public static void Init(MapperConfiguration config)
    {
        MapperConfiguration = config;
        Mapper = config.CreateMapper();
    }
}