Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Created August 28, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiannagel/6b6f9fd8d243e9790392b5ec68c72968 to your computer and use it in GitHub Desktop.
Save christiannagel/6b6f9fd8d243e9790392b5ec68c72968 to your computer and use it in GitHub Desktop.
Applying migrations with EF Core
private static void SeedWithMigrations()
{
using (var context = new F1Context())
{
context.Database.Migrate();
Console.WriteLine("F1 database created, seeded, and updated");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment