title: ASP.NET MVC : validation model evict the id field
body: <p>I have a model, like this : </p>
  
  <pre><code>public class ContactDto
  {
      public int Id { get; set; }
  
      [Display(Name = "FirstName")]
      public string FirstName { get; set; }
  
      [Required]
      [Display(Name = "LastName")]
      [StringLength(50)]
      public string LastName { get; set; }
  }
  </code></pre>
  
  <p>when I do this : </p>
  
  <pre><code>if (!ModelState.IsValid)
  {
  
  }
  </code></pre>
  
  <p>The model is not valid because, I have 0 in the Id. When I do the sume but an update, means with an idea, no problem. Why the Id is check ? How avoid this ?</p>
  
  <p>Thanks,</p>