title: How can I seed data correctly with EF Core and NET Core 2.1?
body: <p>I have this code on my <strong>OnModelCreating</strong> method:</p>
  
  <pre><code>// Users
  modelBuilder.Entity&lt;User&gt;().ToTable(name: "Users", schema: "Core");
  modelBuilder.Entity&lt;User&gt;().HasKey(x =&gt; x.Id);
  
  // Seeder
  modelBuilder.Entity&lt;User&gt;().HasData(MigrationSeeder.Seed());
  </code></pre>
  
  <p>When I generate migration, EF create insert operation like this:</p>
  
  <pre><code>migrationBuilder.InsertData(
      schema: "Core",
      table: "Users",
      columns: new[] { "Id", "FirstName", "LastName" },
      values: new object[] { "6c6aa94903a4", "Rick", "Sánchez" });
  </code></pre>
  
  <p>All right!</p>
  
  <p>But.. when I generate another migration, EF repeat this insert operation (before deleting rows and after, inserting the new rows)</p>
  
  <pre><code>migrationBuilder.DeleteData(
      schema: "Core",
      table: "Users",
      keyColumn: "Id",
      keyValue: "6c6aa94903a4");
  
  migrationBuilder.InsertData(
      schema: "Core",
      table: "Users",
      columns: new[] { "Id", "FirstName", "LastName" },
      values: new object[] { "d055353aa45c", "Rick", "Sánchez" });
  </code></pre>
  
  <p>If this entities corresponding with master tables and database has related rows in another tables. </p>
  
  <p>How can avoid insert in every migration?</p>