title: Mapping lambda expression with AutoMapper
body: <p>I try to map a lambda expression with AutoMapper</p>
  <pre><code>var expressionMapper = new MapperConfiguration(cfg =&gt; cfg.CreateMap&lt;Expression&lt;Func&lt;ClientDTO, bool&gt;&gt;, Expression&lt;Func&lt;Client, bool&gt;&gt;&gt;())
                  .CreateMapper();
  
  //type of predicate is Expression&lt;Func&lt;ClientDTO, bool&gt;&gt;
  var expressionMapped = expressionMapper.Map&lt;Expression&lt;Func&lt;Client, bool&gt;&gt;&gt;(predicate);
  </code></pre>
  <p>Gives the following error :</p>
  <blockquote>
  <p>AutoMapper.AutoMapperMappingException: 'Error mapping types.'</p>
  </blockquote>
  <p>ClientDTO</p>
  <pre><code>    public class ClientDTO
      {
          public int Id { get; set; }
          public String Nom { get; set; }
          public String Prenom { get; set; }
      }
  </code></pre>
  <p>Client (EF Entity)</p>
  <pre><code>    public class Client
      {
          [Key]
          public int Id { get; set; }
  
          public String Nom { get; set; }
  
          public String Prenom { get; set; }
      }
  </code></pre>