title: Error mapping with CsvHelper using .Constant()
body: <p>I'm trying to map a csv file to a POCO class using CsvHelper.  When I try to <code>csv.GetRecords&lt;Client&gt;()</code>, I'm getting an error that states:</p>
  
  <blockquote>
    <p>Field with name 'InID' does not exist.  You can ignore missing fields by setting MissingFieldFound to null.</p>
  </blockquote>
  
  <p>However, I'm actually mapping the <code>InID</code> property of my class using a Constant:</p>
  
  <pre><code>Map(c =&gt; c.InID).Constant(true);
  </code></pre>
  
  <p>Based on what I see in the documentation, using <code>Constant</code> should not require a field in the CSV file.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public class Client{
    public int Id {get; set;}
    public int FirstName {get; set;}
    public int LastName {get; set;}
    public bool InID {get; set;}
    public bool InMH {get; set;}
  }
  
  public class IDMap : ClassMap&lt;Client&gt;
  {
      public IDMap(){
          Map(c =&gt; c.InID).Constant(true);
          Map(c =&gt; c.FirstName).Name("Consumer_First_Name");
          Map(c =&gt; c.LastName).Name("Consumer_Last_Name");
      }
  }
  
  //In my Controller
  List&lt;Client&gt; clients;
  using(var csv = new CsvReader(reader))
  {
      csv.Configuration.RegisterClassMap&lt;IDMap&gt;();
      clients = csv.GetRecords&lt;Client&gt;().ToList();
  }
  </code></pre>
  
  <p>I'm not seeing much difference between what I'm doing and the <a href="https://joshclose.github.io/CsvHelper/examples/configuration/class-maps/constant-value/" rel="nofollow noreferrer">CsvHelper example</a>.</p>
  
  <p><strong>Note</strong></p>
  
  <p>I did try adding <code>csv.Configuration.MissingFieldFound = null</code> but all that does is cause CsvHelper to skip the <code>InID</code> mapping completely rather than populating the property with a constant value.</p>