|
|
|
@ -21,7 +21,7 @@ ChampionEntity champions = new ChampionEntity
|
|
|
|
|
Icon = "icon",
|
|
|
|
|
Bio = "test bio champion"
|
|
|
|
|
};
|
|
|
|
|
using (var context= new SQLiteLolContext())
|
|
|
|
|
using (var context= new LolContext())
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Create and Insert new Champion");
|
|
|
|
|
context.Add(champions);
|
|
|
|
@ -30,14 +30,3 @@ using (var context= new SQLiteLolContext())
|
|
|
|
|
await context.SaveChangesAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SQLiteLolContext : LolContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
|
|
|
{
|
|
|
|
|
if (!options.IsConfigured)
|
|
|
|
|
{
|
|
|
|
|
options.UseSqlite($"Data Source=projet.Champions.db");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|