|
|
|
@ -0,0 +1,44 @@
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace EntityFramework
|
|
|
|
|
{
|
|
|
|
|
public class StubbedContext : LoLDbContext
|
|
|
|
|
{
|
|
|
|
|
//protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
//{
|
|
|
|
|
// optionsBuilder.EnableSensitiveDataLogging();
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
|
|
|
|
|
|
ChampionEntity corichard = new ChampionEntity {Name="Corichard", Bio="biobiobiobio", Icon="/a/a/a/a"};
|
|
|
|
|
ChampionEntity pintrand = new ChampionEntity {Name = "Pintrand", Bio = "mimimimimim", Icon = "/small.png" };
|
|
|
|
|
|
|
|
|
|
//ChampionEntity corichard = new ChampionEntity() { Name = "Corichard", Bio = "biobiobiobio", Icon = "/a/a/a/a", Image = new LargeImageEntity { Base64 = "base" } };
|
|
|
|
|
//ChampionEntity pintrand = new ChampionEntity { Name = "Pintrand", Bio = "mimimimimim", Icon = "/small.png", Image = new LargeImageEntity { Base64 = "base" } };
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<ChampionEntity>().HasData(corichard, pintrand);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<SkinEntity>().HasData(new { Name = "aaaa", ChampionEntityForeignKey = "Corichard", Description = "So What", Icon="/Icon.png", Price=10.0f },
|
|
|
|
|
new { Name = "skin", ChampionEntityForeignKey = "Corichard", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "bo", ChampionEntityForeignKey = "Corichard", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "Joulie", ChampionEntityForeignKey = "Corichard", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "Radiance", ChampionEntityForeignKey = "Corichard", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "void", ChampionEntityForeignKey = "Corichard", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "Radiance", ChampionEntityForeignKey = "Pintrand", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "void", ChampionEntityForeignKey = "Pintrand", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "DarkTheme", ChampionEntityForeignKey = "Pintrand", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "gold", ChampionEntityForeignKey = "Pintrand", Description = "So What", Icon = "/Icon.png", Price = 10.0f },
|
|
|
|
|
new { Name = "ruby", ChampionEntityForeignKey = "Pintrand", Description = "So What", Icon = "/Icon.png", Price = 10.0f }
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|