private static void CreateDatabase2() { using (var context = new BooksContext2()) { context.Database.EnsureCreated(); context.Books.Add(new Book("Professional C# 7 and .NET Core 2.0", "Wrox Press", "Christian Nagel")); context.SaveChanges(); } }
private static void CreateDatabase2() { using (var context = new BooksContext2()) { context.Database.EnsureCreated(); context.Books.Add(new Book("Professional C# 6", "Wrox Press")); context.SaveChanges(); } }