我是第一次使用自动映射.
我正在研究c#应用程序,我想使用自动映射器.
(我只是想知道如何使用它,所以我没有asp.net应用程序既没有MVC应用程序.)
我有三个类库项目.

我想在服务项目中编写转移过程.
所以我想知道如何以及在哪里配置自动映射器?
在我的项目类库(dll)中如何使用automapper苦苦挣扎.请参阅下面我的整体解决方案的结构.
WebApp启动,在Global.asax App Start中,调用AutoMapper.Configure()方法以添加映射配置文件.现在我只是添加Services.AutoMapperViewModelProfile.但我需要以某种方式说明每个WebStoreAdapters中的配置文件(下例中的BigCommerce和Shopify).我希望不要在WebApp中添加对每个WebStoreAdapter的引用,只是为了能够在AutoMapperConfig中添加配置文件.如果我在WebStoreFactory中添加对AutoMapper.Initialize的另一个调用,它将覆盖WebApp中的一个.
还有另一种方式,我错过了或完全偏离这里以其他方式?
WebApp
     - AutoMapperConfig
        - AddProfile Services.AutoMapperViewModelProfile
   Services.dll         
      - AutoMapperViewModelProfile
   Scheduler.dll (uses HangFire to execute cron jobs to get data from shop carts. Its UI is accessed via the WebApp)
       WebStoreAdapter.dll
            -WebStoreFactory
               BigCommerceAdapter.dll
                   - AutoMapperBigCommerceDTOProfile
               ShopifyAdapter.dll
                   - AutoMapperShopifyDTOProfile
从Global.asax调用初始化:
public static class AutoMapperConfiguration
{
    public static void Configure()
    {
        Mapper.Initialize(am =>
        {
            am.AddProfile<AutoMapperViewModelProfile>();
        });
    }    
}
轮廓:
public class AutoMapperViewModelProfile : Profile
{
    public override string ProfileName
    {
        get { return this.GetType().ToString(); }
    }
    protected override …