title: AutoMapper: What is the difference between ForMember() and ForPath()?
body: <p>I am reading AutoMapper's <code>ReverseMap()</code> and I can not understand the difference between <code>ForMember()</code> and <code>ForPath()</code>. Implementations was described <a href="https://github.com/AutoMapper/AutoMapper/wiki/Reverse-Mapping-and-Unflattening" rel="noreferrer">here</a>. In my experience I achieved with <code>ForMember()</code>.</p>
  
  <p>See the following code where I have configured reverse mapping: </p>
  
  <pre><code>public class Customer
  {
      public string Surname { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }
  }
  public class CustomerDto
  {
      public string CustomerName { get; set; }
      public int Age { get; set; }
  }
  
  static void Main(string[] args)
  {
      Mapper.Initialize(cfg =&gt;
      {
          cfg.CreateMap&lt;Customer, CustomerDto&gt;()
             .ForMember(dist =&gt; dist.CustomerName, opt =&gt; opt.MapFrom(src =&gt; $"{src.Surname} {src.Name}"))
              .ReverseMap()
              .ForMember(dist =&gt; dist.Surname, opt =&gt; opt.MapFrom(src =&gt; src.CustomerName.Split(' ')[0]))
              .ForMember(dist =&gt; dist.Name, opt =&gt; opt.MapFrom(src =&gt; src.CustomerName.Split(' ')[1]));
      });
  
      // mapping Customer -&gt; CustomerDto            
      //... 
      //
  
      // mapping CustomerDto -&gt; Customer
      var customerDto = new CustomerDto
      {
          CustomerName = "Shakhabov Adam",
          Age = 31
      };
      var newCustomer = Mapper.Map&lt;CustomerDto, Customer&gt;(customerDto);
  }
  </code></pre>
  
  <p>It is working.</p>
  
  <hr>
  
  <h2>Question</h2>
  
  <p>Do <code>ForMember</code> and <code>ForPath</code> the same things or when should I use <code>ForPath()</code> over <code>ForMember()</code>?</p>