-
-
Save christiannagel/8d75e407fbd166774b5efe3e1665c33c to your computer and use it in GitHub Desktop.
Using the BooksContext to create the database and seed data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var context = new BooksContext()) | |
{ | |
bool created = context.Database.EnsureCreated(); | |
Console.WriteLine($"Books database created and seeded: {created}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment