using VaporStore.Data; using VaporStore.Data.Models; using System.Collections.Generic; // ... var gamesToAdd = new ListIn this example, we create a list of Game objects to add to the database. Each game has a name, price, release date, developer, genre, and game tags. We then instantiate a new VaporStoreDbContext and call the AddRange method, passing in the list of games to add. Finally, we call the SaveChanges method to persist the changes to the database. Package/Library: Entity Framework Core.() { new Game() { Name = "Red Dead Redemption 2", Price = 59.99m, ReleaseDate = new DateTime(2018, 10, 26), Developer = new Developer() { Name = "Rockstar Games" }, Genre = new Genre() { Name = "Action" }, GameTags = new List () { new GameTag() { Tag = new Tag() { Name = "Open World" } } } }, new Game() { Name = "Minecraft", Price = 26.95m, ReleaseDate = new DateTime(2009, 5, 17), Developer = new Developer() { Name = "Mojang Studios" }, Genre = new Genre() { Name = "Survival" }, GameTags = new List () { new GameTag() { Tag = new Tag() { Name = "Sandbox" } } } } }; using var context = new VaporStoreDbContext(); context.Games.AddRange(gamesToAdd); context.SaveChanges();