title: AutoMapper 9.0.0 (non static) gives Missing type map configuration or unsupported mapping error
body: <p>I have a ASP.Net Web API that was using Automapper 7.0.1 with static mappings. I recently upgraded to Automapper 9.0.0 which does not have static mappings. So, I used the recommended way of using my Dependency Container (Unity Container) to register the instances of <code>IMapper</code> and <code>IConfigurationProvider</code> as Singletons.</p>
  
  <pre><code>var config = AutoMapperConfig.GetMapperConfiguration();
  _container.RegisterInstance&lt;IConfigurationProvider&gt;(config, new SingletonLifetimeManager());
  _container.RegisterInstance&lt;IMapper&gt;(new Mapper(config), new SingletonLifetimeManager());
  </code></pre>
  
  <p>The <code>AutoMapperConfig.GetMapperConfiguration()</code> is a static method that returns a new Config with all the mappings.</p>
  
  <pre><code>public static MapperConfiguration GetMapperConfiguration()
  {
      return new MapperConfiguration(config =&gt;
      {
         config.CreateMap&lt;MyDtoReq, MyModel1&gt;(MemberList.Destination);
         config.CreateMap&lt;MyModel1, MyDtoRes&gt;(MemberList.Destination);
         // other mappings
      }
  }
  </code></pre>
  
  <p>Therafter, I have resolved and used <code>IMapper</code> in numerous services which are registered with <code>PerRequestLifetimeManager</code>, like:</p>
  
  <pre><code>_container.RegisterType&lt;IService1, Service1&gt;(new PerRequestLifetimeManager());
  </code></pre>
  
  <p>I can see that the Unity resolved both Services and Mapper properly, but when I call <code>Map()</code> using: </p>
  
  <pre><code>_service1.Mapper.Map&lt;MyDtoRes&gt;(myModel1ObjectInstance);
  </code></pre>
  
  <p>It gives me an AutoMapperException saying</p>
  
  <blockquote>
    <p>Missing type map configuration or unsupported mapping error</p>
  </blockquote>
  
  <p>I have tried many things inclduding, registering the AutoMapper objects as PerRequest dependencies, even as Singletons using a static class (without DI container) but to no avail.</p>
  
  <p>I am sure that my mappings are correct because they worked with Static AutoMapper in v 7.0.1. What have I missed out after the upgrade?</p>