title: Cannot insert explicit value for identity column in table when identity insert is set to off
body: <p>I tried filling in a table I generated using EF Core with values through Microsoft SQL Management Studio, since the list was predefined and wouldn't require editing in the future. I got the error I wrote in the title inside the console of SSMS.</p>
  
  <p>I managed to resolve the issue by writing <code>SET IDENTITY_INSERT Countries ON</code> above the script that would insert all the values.</p>
  
  <p>This problem seems to have to do with the primary key attribute.</p>
  
  <p>My question is: how do I fix this using EF Core methods, instead of the <code>SET IDENTITY_INSERT ON</code> SQL command, and what exactly is the issue?</p>
  
  <p>Problem table:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Country
  {
      public string Code { get; set; }
      [Required]
      public int Id { get; set; }
      public string LongName { get; set; }
      [Required]
      public string Name { get; set; }
  }
  </code></pre>