// See https://aka.ms/new-console-template for more information

using EntityFrameWorkLib;
using Microsoft.EntityFrameworkCore;
using Shared;

SkillEntity skill1 = new SkillEntity
{
    Name = "skill1",
    Description = "Cette description est celle du skill1",
    SkillType = SkillType.Basic,
};

LargeImageEntity largeImage = new LargeImageEntity
{
    Base64 = "data:image/png;base64,[encoded data, 7684 characters]"
};

ChampionEntity jax = new ChampionEntity
{
    Name = "jax",
    Icon = "icon jax",
    Bio = "test bio jax",
    Class = ChampionClass.Fighter,
    LargeImage = largeImage
};
ChampionEntity darius = new ChampionEntity
{
    Name = "darius",
    Icon = "icon darius",
    Bio = "test bio darius",
    Class = ChampionClass.Assassin,
};
ChampionEntity champions = new ChampionEntity
{
    Name = "toto",
    Icon = "icon",
    Bio = "test bio champion",
    Class = ChampionClass.Marksman,
};

using (var context = new LolContext())
{
    Console.WriteLine("Create and Insert new Champion");
    context.Skill.AddAsync(skill1);
    context.LargeImage.AddAsync(largeImage);
    context.Champions.AddAsync(champions);
    context.Champions.AddAsync(darius);
    context.Champions.AddAsync(jax);

    await context.SaveChangesAsync();
}