title: Is it possible to use methods with new MapperConfiguration?
body: <p>I got a very simple question...
  Is it possible to setup a AutoMapper like this:</p>
  
  <pre><code>public IMapper Init()
  {
       var config = new MapperConfiguration(cfg =&gt;
       {
           cfg = MappingModelsToViewModels(cfg);
        });
  
        return config.CreateMapper();
  }
  </code></pre>
  
  <p>I splitted each mapping in to method like this: </p>
  
  <pre><code> public IMapperConfigurationExpression MappingModelsToViewModels(IMapperConfigurationExpression cfg)
   {
       cfg = SKU(cfg);
       cfg = Lot(cfg);
       cfg = SalesRate(cfg);
       cfg = SpecialSalesRate(cfg);
       cfg = Order(cfg);
       //...
  
       return cfg;
  }
  
          public IMapperConfigurationExpression SKU(IMapperConfigurationExpression cfg)
          {
                 // HTTPGET
                 cfg.CreateMap&lt;SKU, SKUViewModel&gt;() //...
                 return cfg; 
          }
  </code></pre>
  
  <p>I ask because I got this error:</p>
  
  <blockquote>
    <p>Mapper not initialized. Call Initialize with appropriate
    configuration. If you are trying to use mapper instances through a
    container or otherwise, make sure you do not have any calls to the
    static Mapper.Map methods, and if you're using ProjectTo or
    UseAsDataSource extension methods, make sure you pass in the
    appropriate IConfigurationProvider instance.</p>
  </blockquote>
  
  <p>And I did a test by moving a part of the mapping code in to the new MapperConfiguration and it was working.</p>
  
  <p>Thanks,</p>
  
  <p>David</p>