I have created private Seed() method in my Startup.cs but I also like your approach because it can be used not only during application startup.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
this.Seed();
}
private void Seed()
{
using (var db = new MyDbContext())
{
db.Database.Migrate();
// Seed code
db.SaveChanges();
}
}