title: 'AutoMapper.AutoMapperMappingException' occurred in AutoMapper.dll
body: <pre><code> public class ClientViewModel
      {
          [Required(ErrorMessage = "The Client Code field is required.")]  
          public string ClientCode { get; set; }
          [Required(ErrorMessage = "The Company Legal Name field is required.")]  
          public string CompanyLegalName { get; set; }
          public string Notes { get; set; }
          public string Address { get; set; }
          public string City { get; set; }
          public string State { get; set; }
          public string Zip { get; set; }
          public Nullable&lt;DateTime&gt; ScheduledDate { get; set; }
          public Nullable&lt;decimal&gt; AmountDiscount { get; set; }
      }
  
      public class Client
      {
          public string ClientCode { get; set; }   
          public string CompanyLegalName { get; set; }
          public string Notes { get; set; }
          public string Address { get; set; }
          public string City { get; set; }
          public string State { get; set; }
          public string Zip { get; set; }
          public Nullable&lt;DateTime&gt; ScheduledDate { get; set; }
          public Nullable&lt;decimal&gt; AmountDiscount { get; set; }
      }
  </code></pre>
  
  <p>Edit:</p>
  
  <blockquote>
    <p>Exception Details: AutoMapper.AutoMapperMappingException: Missing type
    map configuration or unsupported mapping.</p>
    
    <p>Mapping types: Client -> ClientViewModel myapp.Models.Client ->
    myapp.Models.ClientViewModel</p>
    
    <p>Destination path: ClientViewModel</p>
    
    <p>Source value: myapp.Models.Client</p>
  </blockquote>
  
  <p>My <code>Client</code> &amp; <code>ClientViewModel</code> has exact same number of props and below is my code that I'm using and its throwing error without getting much information, what I'm missing here?</p>
  
  <pre><code>Client client = context.Clients.Where(x =&gt; x.CustomerID == id).FirstOrDefault();
  ClientViewModel clientViewModel = Mapper.Map&lt;Client, ClientViewModel&gt;(client);
  </code></pre>
  
  <blockquote>
    <p>An exception of type 'AutoMapper.AutoMapperMappingException' occurred
    in AutoMapper.dll but was not handled in user code</p>
  </blockquote>