title: Seeding Data with Entity Framework 3.0 with Model or Migration?
body: <p>With the latest ASP.NET Core 3, and EF Core 3, I want to seed data as I've done in previous version of EF. I notice that in the Microsoft docs, they point at this code as an example of how to seed.</p>
  
  <p><a href="https://github.com/aspnet/EntityFramework.Docs/tree/master/samples/core/Modeling/DataSeeding/Migrations" rel="nofollow noreferrer">https://github.com/aspnet/EntityFramework.Docs/tree/master/samples/core/Modeling/DataSeeding/Migrations</a></p>
  
  <p>It updates the migration with code like this:</p>
  
  <pre><code>        migrationBuilder.InsertData(
              table: "Posts",
              columns: new[] { "PostId", "BlogId", "Content", "Title", "AuthorName_First", "AuthorName_Last" },
              values: new object[] { 1, 1, "Test 1", "First post", "Andriy", "Svyryd" });
  
          migrationBuilder.InsertData(
              table: "Posts",
              columns: new[] { "PostId", "BlogId", "Content", "Title", "AuthorName_First", "AuthorName_Last" },
              values: new object[] { 2, 1, "Test 2", "Second post", "Diego", "Vega" });
  </code></pre>
  
  <p>This seems "uncomfortable" to me as the way I've learned to init all my data and tables is to remove my migrations folder and then recreate the database. If I manually update a migration, then I'm stuck keeping this migration forever.</p>
  
  <p>Is there a better way to handle seeding data in EF Core 3? Maybe with dbContext or somehow putting something in the model class itself?</p>