title: Apply all migrations up to specific migration
body: <p>It is possible to apply all migrations by using the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.relationaldatabasefacadeextensions.migrate?view=efcore-2.1" rel="nofollow noreferrer"><code>RelationalDatabaseFacadeExtensions.Migrate</code></a> extension method. e.g.</p>
  
  <pre><code>if (_ctx.Database.GetPendingMigrations().Any())
  {
      //Apply migration
      _ctx.Database.Migrate();
  }
  </code></pre>
  
  <p>However, I have a specific requirement to carry out the following migration actions at runtime:</p>
  
  <ol>
  <li>Apply migrations up to a certain point</li>
  <li>Seed some data</li>
  <li>Apply all remaining migrations (this will remove columns which are no
  longer required after the seeding)</li>
  </ol>
  
  <p>Is there a method that I can use to apply all migrations up to a specific (named) migration at runtime (e.g. an equivalent to the .net Core CLI command <a href="https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet#dotnet-ef-database-update" rel="nofollow noreferrer"><code>dotnet ef database update</code></a>)?</p>