title: How to map nested object in automapper without using inline mapping or multiple .ForMember?
body: <p>There is a <a href="https://stackoverflow.com/questions/34271334/automapper-how-to-map-nested-object">question</a>, that describes what i want to get very precisely, but they are using inline mapping.</p>
  <h3>Source/destination types</h3>
  <pre class="lang-cs prettyprint-override"><code>public class SrcInner
  {
      public int A {get;set;} // imagine here 100500 properties
  }
  
  public class SrcOuter
  {
      public int B {get;set;}
      public SrcInner C {get;set}
  }
  
  public class Dest
  {
      public int A {get;set;} // so here imagine 100500 same properties, as in SrcInner
      public int B {get;set;}
  }
  </code></pre>
  <h3>Mapping configuration</h3>
  <pre class="lang-cs prettyprint-override"><code>public static void AddMapper(this IServiceCollection services)
  {
      var config = new MapperConfiguration(cfg =&gt;
      {
          cfg.CreateMap&lt;SrcInner, Dest&gt;();
          cfg.CreateMap&lt;SrcOuter, Dest&gt;();
      });
  
      var mapper = config.CreateMapper();
  
      services.AddSingleton(mapper);
  }
  </code></pre>
  <h3>Expected behavior</h3>
  <p>Both A and B properties are filled after mapping.</p>
  <h3>Actual behavior</h3>
  <p>Only B property is filled after mapping.</p>
  <h3>Steps to reproduce</h3>
  <pre class="lang-cs prettyprint-override"><code>public class Foo
  {
      IMapper Mapper{get;set;}
      public Foo(IMapper mapper) // comes through dependency injection
      {
          Mapper = mapper;
      }
  
      public Bar()
      {
          var test = new SrcOuter()
          {
              B = 10;
              C = new SrcInner()
              {
                  A = 10;
              }
          }
          var testDest = new Dest();
          mapper.Map(test, Dest);
      }
  }
  </code></pre>
  <p>Is there a proper way to set configuration that way, so such mapping will work?</p>
  <hr />
  <h1>UPDATE</h1>
  <p>Is there a way to map Dest to SrcOuter with filling SrcInner?</p>