title: After set id to identity, the post function for my api doesnt work
body: <pre><code> "Cannot insert explicit value for identity column in table 'Users' when IDENTITY_INSERT is set to OFF.",
  </code></pre>
  
  <p>I used code first migration and when I add-migration, i changed the code shows up and added identity:true to my primary key: userId.</p>
  
  <p>Then after that, my post api failed. </p>
  
  <p>Any idea why this happens?</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>public class User
  {
      public byte UserId { get; set; }
  
      [Required]
      [StringLength(255)]
      public string UserName { get; set; }
  
      [Required]
      [StringLength(255)]
      public string FirstName { get; set; }
  
      [Required]
      [StringLength(255)]
      public string LastName { get; set; }
  
      [Required]
      [JsonIgnore]
      public DateTime CreatedAt { get; set; }
  
      [Required]
      [JsonIgnore]
      public DateTime ModifiedAt { get; set; }
  
  
  }
  </code></pre>