using Microsoft.EntityFrameworkCore; using Portfolio.Domain.Features.Articles; using Portfolio.Domain.Features.Pokemon; using Portfolio.Domain.Features.Pokemon_Natures; using Portfolio.Domain.Features.Pokemon_Subskills; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Portfolio.Infrastructure { public class ApplicationDbContext : DbContext { public ApplicationDbContext(DbContextOptions options) : base(options) { } public DbSet Pokemons { get; set; } public DbSet PokemonNatures { get; set; } public DbSet PokemonSubskills { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); //Pokemon modelBuilder.Entity().HasData(new Pokemon { Id = 1, PokemonId = 1, PokemonName = "Bulbasaur", SleepType = "Dozing", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 2, PokemonId = 2, PokemonName = "Ivysaur", SleepType = "Dozing", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 3, PokemonId = 3, PokemonName = "Venasaur", SleepType = "Dozing", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 4, PokemonId = 4, PokemonName = "Charmander", SleepType = "Snoozing", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 5, PokemonId = 5, PokemonName = "Charmeleon", SleepType = "Snoozing", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 6, PokemonId = 6, PokemonName = "Charizard", SleepType = "Snoozing", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 7, PokemonId = 7, PokemonName = "Squirtle", SleepType = "Slumbering", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 8, PokemonId = 8, PokemonName = "Wartortle", SleepType = "Slumbering", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 9, PokemonId = 9, PokemonName = "Blastoise", SleepType = "Slumbering", Speciality = "Ingredients" }); modelBuilder.Entity().HasData(new Pokemon { Id = 10, PokemonId = 10, PokemonName = "Caterpie", SleepType = "Dozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 11, PokemonId = 11, PokemonName = "Metapod", SleepType = "Dozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 12, PokemonId = 12, PokemonName = "Butterfree", SleepType = "Dozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 13, PokemonId = 19, PokemonName = "Rattata", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 14, PokemonId = 20, PokemonName = "Raticate", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 15, PokemonId = 23, PokemonName = "Ekans", SleepType = "Dozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 16, PokemonId = 24, PokemonName = "Arbok", SleepType = "Dozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 17, PokemonId = 25, PokemonName = "Pikachu", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 18, PokemonId = 26, PokemonName = "Raticate", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 19, PokemonId = 35, PokemonName = "Clefairy", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 20, PokemonId = 36, PokemonName = "Clefable", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 21, PokemonId = 37, PokemonName = "Vulpix", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 22, PokemonId = 38, PokemonName = "Ninetails", SleepType = "Snoozing", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 23, PokemonId = 37, PokemonName = "Vulpix", IsVariation = true, VariationName = "Alolan", SleepType = "Slumbering", Speciality = "Berries" }); modelBuilder.Entity().HasData(new Pokemon { Id = 24, PokemonId = 38, PokemonName = "Ninetails", IsVariation = true, VariationName = "Alolan", SleepType = "Slumbering", Speciality = "Berries" }); } } }