title: WebApi POST not to include ID field
body: <p>I am still just a couple days into ASP.NET and WebAPI frameworks so I must be missing out something really simple.</p>
  
  <p>I have a model that has a couple properties and ID (as a property, which has a private setter but that didn't help).</p>
  
  <pre><code>public long ID { get; private set; }
  
  [Required(ErrorMessage = "Location coordinate X is required.")]
  public double X { get; set; }
  
  [Required(ErrorMessage = "Location coordinate Y is required.")]
  public double Y { get; set; }
  </code></pre>
  
  <p>And then I have a controller method post:</p>
  
  <pre><code>public HttpResponseMessage Post(MyModel model)
  </code></pre>
  
  <p>When I start the project and go to auto-generated API documentation, I can see that samples include ID as an input field. <strong>I want API to ignore ID input field.</strong> I could just ignore it myself but I don't like such <em>must-remember-not-to-use</em> things in my code.</p>
  
  <p>One option would be to create a separate model just for the input but it would mean I have to maintain two classes instead of one.</p>
  
  <p>Is there any data annotation to ignore this property entirely?</p>