title: AutoMapper with ValueFormatter
body: <p>I'm learning how to use AutoMapper, and I'm having problems using it with ValueFormatter.</p>
  
  <p>Here's simple example in Console, where I'm unable to use it with NameFormatter:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Mapper.Initialize(x =&gt; x.AddProfile&lt;ExampleProfile&gt;());
  
          var person = new Person {FirstName = "John", LastName = "Smith"};
  
          PersonView oV = Mapper.Map&lt;Person, PersonView&gt;(person);
  
          Console.WriteLine(oV.Name);
  
          Console.ReadLine();
      }
  }
  
  public class ExampleProfile : Profile
  {
      protected override void Configure()
      {
          //works:
          //CreateMap&lt;Person, PersonView&gt;()
          //    .ForMember(personView =&gt; personView.Name, ex =&gt; ex.MapFrom(
          //        person =&gt; person.FirstName + " " + person.LastName));
  
          //doesn't work:
          CreateMap&lt;Person, PersonView&gt;()
              .ForMember(personView =&gt; personView.Name, 
               person =&gt; person.AddFormatter&lt;NameFormatter&gt;());
      }
  }
  
  public class NameFormatter : ValueFormatter&lt;Person&gt;
  {
      protected override string FormatValueCore(Person value)
      {
          return value.FirstName + " " + value.LastName;
      }
  }
  
  public class Person
  {
      public string FirstName { get; set; }
      public string LastName { get; set; }
  }
  
  public class PersonView
  {
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>What am I missing here? AutoMapper is version 2.2.1</p>