diff --git a/.vs/LolProject/v17/.suo b/.vs/LolProject/v17/.suo
index fa82156..3708a4f 100644
Binary files a/.vs/LolProject/v17/.suo and b/.vs/LolProject/v17/.suo differ
diff --git a/README.md b/README.md
index c09d630..aa98fca 100644
--- a/README.md
+++ b/README.md
@@ -191,6 +191,30 @@ réalisez à nouveau la migration (ou mettez à jour celle actuelle), puis suppr
+- ### Comment utiliser l'application MAUI ?
+
+Si vous préférez éviter la manipulation de l'API, vous pouvez également utiliser le **client MAUI**. Celui-ci contacte directement l'ApiManager, qui se charge des requêtes HTTP à l'API, et vous permet de visualiser et de modifier les données grâce à une interface graphique.
+
+Page **Home**:
+
+
+
+
+
+
+
+Page **Champions**:
+
+
+
+
+
+
+
+Vous pouvez vous amuser à filtrer les champions sur cette page, visualiser leurs skins, les modifier, et même en ajouter ! :grin:
+
+:information_source: *Pour utiliser cette application, vous devez avoir la dernière version de Visual Studio, avoir effectué la migration auparavant (comme indiqué ci-dessus), et avoir sélectionné la solution **LeagueOfLegends** plutôt que **LeagueOfLegendsCi**. Si vous avez besoin d'aide ou si vous souhaitez obtenir plus d'informations, vous pouvez contacter le technicien responsable de l'application (c'est-à-dire moi), en vous référant à mon mail ci-dessous. :email:*
+
Mon environnement de travail est basé sur un outil et un langage en particulier : 👇
@@ -210,7 +234,7 @@ Mon environnement de travail est basé sur un outil et un langage en particulier
-:mortar_board: Emre KARTAL
+:mortar_board: Emre KARTAL : Emre.kartal@etu.uca.fr
diff --git a/doc/Images/MauiClientChampions.gif b/doc/Images/MauiClientChampions.gif
new file mode 100644
index 0000000..819824e
Binary files /dev/null and b/doc/Images/MauiClientChampions.gif differ
diff --git a/doc/Images/MauiClientHome.png b/doc/Images/MauiClientHome.png
new file mode 100644
index 0000000..4812772
Binary files /dev/null and b/doc/Images/MauiClientHome.png differ
diff --git a/src/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj b/src/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj
index f765ca4..d01f0d6 100644
--- a/src/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj
+++ b/src/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj
@@ -17,6 +17,7 @@
+
diff --git a/src/EntityFramework_LoL/Sources/ApiLol/Program.cs b/src/EntityFramework_LoL/Sources/ApiLol/Program.cs
index 98e6f6c..591bbb2 100644
--- a/src/EntityFramework_LoL/Sources/ApiLol/Program.cs
+++ b/src/EntityFramework_LoL/Sources/ApiLol/Program.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Versioning;
using Model;
-using StubLib;
var builder = WebApplication.CreateBuilder(args);
@@ -29,7 +28,7 @@ builder.Services.AddVersionedApiExplorer(setup =>
setup.SubstituteApiVersionInUrl = true;
});
-builder.Services.AddSingleton();
+builder.Services.AddSingleton();
var app = builder.Build();
diff --git a/src/EntityFramework_LoL/Sources/DbManager/DbManager.Champions.cs b/src/EntityFramework_LoL/Sources/DbManager/DbManager.Champions.cs
index 16a2328..71e5bc7 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/DbManager.Champions.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/DbManager.Champions.cs
@@ -1,6 +1,8 @@
-using Model;
+using DbManager.Mapper;
+using Microsoft.EntityFrameworkCore;
+using Model;
-namespace DbManager
+namespace DbLib
{
public partial class DbManager
{
@@ -11,94 +13,109 @@ namespace DbManager
public ChampionsManager(DbManager parent)
=> this.parent = parent;
- public Task AddItem(Champion? item)
+ public async Task AddItem(Champion? item)
{
- throw new NotImplementedException();
+ var champion = await parent.DbContext.Champions.AddAsync(item.ToEntity(parent.DbContext));
+ parent.DbContext.SaveChanges();
+ return champion.Entity.ToModel();
}
- public Task DeleteItem(Champion? item)
+ public async Task DeleteItem(Champion? item)
{
- throw new NotImplementedException();
+ var toDelete = parent.DbContext.Champions.Find(item.Name);
+ if (toDelete != null)
+ {
+ parent.DbContext.Champions.Remove(toDelete);
+ parent.DbContext.SaveChanges();
+ return true;
+ }
+ return false;
}
- public Task> GetItemByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
- public Task> GetItems(int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ private Func filterByNameContains = (champ, substring) => champ.Name.Contains(substring, StringComparison.InvariantCultureIgnoreCase);
- public Task> GetItemsByCharacteristic(string charName, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ private Func filterByName = (champ, substring) => champ.Name.Equals(substring, StringComparison.InvariantCultureIgnoreCase);
- public Task> GetItemsByClass(ChampionClass championClass, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ public async Task> GetItemByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.GetItemsWithFilterAndOrdering(champ => filterByName(champ.ToModel(), substring), index, count, orderingPropertyName, descending)
+ .Select(c => c.ToModel());
- public Task> GetItemsByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
- public Task> GetItemsByRunePage(RunePage? runePage, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ public async Task> GetItems(int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.GetItemsWithFilterAndOrdering(
+ c => true,
+ index, count,
+ orderingPropertyName, descending).Select(c => c.ToModel());
- public Task> GetItemsBySkill(Skill? skill, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ private Func filterByCharacteristic = (champ, charName) => champ.Characteristics.Keys.Any(k => k.Contains(charName, StringComparison.InvariantCultureIgnoreCase));
- public Task> GetItemsBySkill(string skill, int index, int count, string? orderingPropertyName = null, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ public async Task> GetItemsByCharacteristic(string charName, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.Include(c => c.Characteristics).GetItemsWithFilterAndOrdering(
+ champ => filterByCharacteristic(champ.ToModel(), charName),
+ index, count, orderingPropertyName, descending).Select(c => c.ToModel());
- public Task GetNbItems()
- {
- throw new NotImplementedException();
- }
+ private Func filterByClass = (champ, championClass) => champ.Class == championClass;
+
+ public async Task> GetItemsByClass(ChampionClass championClass, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.GetItemsWithFilterAndOrdering(
+ champ => filterByClass(champ.ToModel(), championClass),
+ index, count, orderingPropertyName, descending).Select(c => c.ToModel());
+
+ public async Task> GetItemsByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.GetItemsWithFilterAndOrdering(champ => filterByNameContains(champ.ToModel(), substring), index, count, orderingPropertyName, descending)
+ .Select(c => c.ToModel());
+
+ public async Task> GetItemsByRunePage(RunePage? runePage, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.Include("RunePages").GetItemsWithFilterAndOrdering(
+ c => c.RunePages.Any(rp => rp.Equals(runePage.ToEntity(parent.DbContext))),
+ index, count,
+ orderingPropertyName, descending).Select(c => c.ToModel());
+
+ public async Task> GetItemsBySkill(Skill? skill, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.GetItemsWithFilterAndOrdering(champ => filterBySkill(champ.ToModel(), skill), index, count, orderingPropertyName, descending)
+ .Select(c => c.ToModel());
+
+
+ public async Task> GetItemsBySkill(string skill, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ => parent.DbContext.Champions.GetItemsWithFilterAndOrdering(champ => filterBySkillSubstring(champ.ToModel(), skill), index, count, orderingPropertyName, descending)
+ .Select(c => c.ToModel());
+
+ public async Task GetNbItems()
+ => parent.DbContext.Champions.Count();
public Task GetNbItemsByCharacteristic(string charName)
- {
- throw new NotImplementedException();
- }
+ => parent.DbContext.Champions.GetNbItemsWithFilter(champ => filterByCharacteristic(champ.ToModel(), charName));
- public Task GetNbItemsByClass(ChampionClass championClass)
- {
- throw new NotImplementedException();
- }
+ public async Task GetNbItemsByClass(ChampionClass championClass)
+ => parent.DbContext.Champions.Where(c => c.Class.Equals(championClass))
+ .Count();
- public Task GetNbItemsByName(string substring)
- {
- throw new NotImplementedException();
- }
+ public async Task GetNbItemsByName(string substring)
+ => parent.DbContext.Champions.Where(c => c.Name.Equals(substring))
+ .Count();
- public Task GetNbItemsByRunePage(RunePage? runePage)
- {
- throw new NotImplementedException();
- }
+ public async Task GetNbItemsByRunePage(RunePage? runePage)
+ => parent.DbContext.Champions.Where(c => c.RunePages.Any(rp => rp.Equals(runePage.ToEntity(parent.DbContext))))
+ .Count();
+
+
+ private Func filterBySkill = (champ, skill) => skill != null && champ.Skills.Contains(skill!);
public Task GetNbItemsBySkill(Skill? skill)
- {
- throw new NotImplementedException();
- }
+ => parent.DbContext.Champions.GetNbItemsWithFilter(champ => filterBySkill(champ.ToModel(), skill));
+
+ private static Func filterBySkillSubstring = (champ, skill) => champ.Skills.Any(s => s.Name.Contains(skill, StringComparison.InvariantCultureIgnoreCase));
public Task GetNbItemsBySkill(string skill)
- {
- throw new NotImplementedException();
- }
+ => parent.DbContext.Champions.GetNbItemsWithFilter(champ => filterBySkillSubstring(champ.ToModel(), skill));
- public Task UpdateItem(Champion? oldItem, Champion? newItem)
+ public async Task UpdateItem(Champion? oldItem, Champion? newItem)
{
- throw new NotImplementedException();
+ var toUpdate = parent.DbContext.Champions.Find(oldItem.Name);
+ toUpdate = newItem.ToEntity(parent.DbContext);
+ parent.DbContext.SaveChanges();
+ return newItem;
}
}
}
diff --git a/src/EntityFramework_LoL/Sources/DbManager/DbManager.RunePages.cs b/src/EntityFramework_LoL/Sources/DbManager/DbManager.RunePages.cs
index d3b54d2..a05db45 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/DbManager.RunePages.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/DbManager.RunePages.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-namespace DbManager
+namespace DbLib
{
public partial class DbManager
{
diff --git a/src/EntityFramework_LoL/Sources/DbManager/DbManager.Runes.cs b/src/EntityFramework_LoL/Sources/DbManager/DbManager.Runes.cs
index ec2abfa..4fcb8fe 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/DbManager.Runes.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/DbManager.Runes.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-namespace DbManager
+namespace DbLib
{
public partial class DbManager
{
diff --git a/src/EntityFramework_LoL/Sources/DbManager/DbManager.Skins.cs b/src/EntityFramework_LoL/Sources/DbManager/DbManager.Skins.cs
index cb5ecc8..45c9bf3 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/DbManager.Skins.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/DbManager.Skins.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
-namespace DbManager
+namespace DbLib
{
public partial class DbManager
{
diff --git a/src/EntityFramework_LoL/Sources/DbManager/DbManager.cs b/src/EntityFramework_LoL/Sources/DbManager/DbManager.cs
index 33fae54..8ad6f6b 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/DbManager.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/DbManager.cs
@@ -1,12 +1,22 @@
-using Model;
+using Microsoft.EntityFrameworkCore;
+using Model;
using MyFlib;
-namespace DbManager
+namespace DbLib
{
public partial class DbManager : IDataManager
{
protected LolDbContext DbContext { get; set; }
+ public DbManager()
+ {
+ DbContext = new LolDbContext();
+ ChampionsMgr = new ChampionsManager(this);
+ SkinsMgr = new SkinsManager(this);
+ RunesMgr = new RunesManager(this);
+ RunePagesMgr = new RunePagesManager(this);
+ }
+
public DbManager(LolDbContext dbContext)
{
DbContext = dbContext;
diff --git a/src/EntityFramework_LoL/Sources/DbManager/Extensions.cs b/src/EntityFramework_LoL/Sources/DbManager/Extensions.cs
new file mode 100644
index 0000000..239fae0
--- /dev/null
+++ b/src/EntityFramework_LoL/Sources/DbManager/Extensions.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DbLib
+{
+ static class Extensions
+ {
+ internal static IEnumerable GetItemsWithFilterAndOrdering(this IEnumerable collection,
+ Func filter, int index, int count, string? orderingPropertyName = null, bool descending = false)
+ {
+ IEnumerable temp = collection;
+ temp = temp.Where(item => filter(item));
+ if (orderingPropertyName != null)
+ {
+ var prop = typeof(T).GetProperty(orderingPropertyName!);
+ if (prop != null)
+ {
+ temp = descending ? temp.OrderByDescending(item => prop.GetValue(item))
+ : temp.OrderBy(item => prop.GetValue(item));
+ }
+ }
+ return temp.Skip(index * count).Take(count);
+ }
+
+ internal static Task GetNbItemsWithFilter(this IEnumerable collection, Func filter)
+ {
+ return Task.FromResult(collection.Count(item => filter(item)));
+ }
+ }
+}
diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs
index 454bc54..66adf27 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs
@@ -8,7 +8,7 @@ namespace DbManager.Mapper
{
public static Champion ToModel(this ChampionEntity championEntity)
{
- Champion champion = new (championEntity.Name, championEntity.Class.ToModel(), championEntity.Icon, championEntity.Image.Base64.ToString(), championEntity.Bio);
+ Champion champion = new (championEntity.Name, championEntity.Class.ToModel(), championEntity.Icon, "", championEntity.Bio);
foreach (var skill in championEntity.Skills)
{
champion.AddSkill(skill.ToModel());
diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs
index 839ba0e..d485243 100644
--- a/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs
+++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs
@@ -20,5 +20,29 @@ namespace DbManager.Mapper
}
return runePage;
}
+
+ public static RunePageEntity ToEntity(this RunePage runePage, LolDbContext context)
+ {
+ RunePageEntity? runePageEntity = context.RunePages.Find(runePage.Name);
+ if (runePageEntity == null)
+ {
+ runePageEntity = new()
+ {
+ Name = runePage.Name,
+ };
+
+ runePageEntity.DictionaryCategoryRunes = new List();
+ foreach (var r in runePage.Runes)
+ {
+ runePageEntity.DictionaryCategoryRunes.Add(new DictionaryCategoryRune()
+ {
+ category = r.Key.ToEntity(),
+ rune = r.Value.ToEntity(),
+ });
+ }
+
+ }
+ return runePageEntity;
+ }
}
}
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db b/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db
index 298aaff..4436f2f 100644
Binary files a/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db and b/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db differ
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs b/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs
index e680eb9..4cfd544 100644
--- a/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs
+++ b/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs
@@ -1,6 +1,8 @@
using Microsoft.EntityFrameworkCore;
using MyFlib.Entities;
using MyFlib.Entities.enums;
+using System.IO;
+using System.Reflection;
namespace MyFlib
{
@@ -24,7 +26,8 @@ namespace MyFlib
{
if (!optionsBuilder.IsConfigured)
{
- optionsBuilder.UseSqlite("Data Source=DataBase.db");
+ string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "..\\..\\..\\..\\MyFlib\\DataBase.db");
+ optionsBuilder.UseSqlite($"Data Source={path}");
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230325153221_myMigration.Designer.cs b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230325153221_myMigration.Designer.cs
new file mode 100644
index 0000000..5845de8
--- /dev/null
+++ b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230325153221_myMigration.Designer.cs
@@ -0,0 +1,671 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using MyFlib;
+
+#nullable disable
+
+namespace MyFlib.Migrations
+{
+ [DbContext(typeof(LolDbContext))]
+ [Migration("20230325153221_myMigration")]
+ partial class myMigration
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
+
+ modelBuilder.Entity("ChampionEntityRunePageEntity", b =>
+ {
+ b.Property("ChampionsId")
+ .HasColumnType("TEXT");
+
+ b.Property("RunePagesName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("ChampionsId", "RunePagesName");
+
+ b.HasIndex("RunePagesName");
+
+ b.ToTable("ChampionEntityRunePageEntity");
+ });
+
+ modelBuilder.Entity("MyFlib.ChampionEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("Bio")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property("Class")
+ .HasColumnType("INTEGER");
+
+ b.Property("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ImageId")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ImageId");
+
+ b.ToTable("Champions");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Bio = "",
+ Class = 1,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Akali"
+ },
+ new
+ {
+ Id = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Bio = "",
+ Class = 2,
+ Icon = "",
+ ImageId = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"),
+ Name = "Aatrox"
+ },
+ new
+ {
+ Id = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Bio = "",
+ Class = 3,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Ahri"
+ },
+ new
+ {
+ Id = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Bio = "",
+ Class = 4,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Akshan"
+ },
+ new
+ {
+ Id = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Bio = "",
+ Class = 5,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Bard"
+ },
+ new
+ {
+ Id = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Bio = "",
+ Class = 6,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Alistar"
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.DictionaryCategoryRune", b =>
+ {
+ b.Property("RunePageName")
+ .HasColumnType("TEXT");
+
+ b.Property("RuneName")
+ .HasColumnType("TEXT");
+
+ b.Property("category")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("RunePageName", "RuneName");
+
+ b.HasIndex("RuneName");
+
+ b.ToTable("CategoryRunes");
+
+ b.HasData(
+ new
+ {
+ RunePageName = "Page 1",
+ RuneName = "Hextech Flashtraption ",
+ category = 0
+ },
+ new
+ {
+ RunePageName = "Page 1",
+ RuneName = "Manaflow Band ",
+ category = 1
+ },
+ new
+ {
+ RunePageName = "Page 2",
+ RuneName = "Manaflow Band ",
+ category = 4
+ },
+ new
+ {
+ RunePageName = "Page 2",
+ RuneName = "Hextech Flashtraption ",
+ category = 5
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.CharacteristicEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(254)
+ .HasColumnType("TEXT");
+
+ b.Property("ChampionForeignKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Name", "ChampionForeignKey");
+
+ b.HasIndex("ChampionForeignKey");
+
+ b.ToTable("Characteristic");
+
+ b.HasData(
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 58
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 92
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 6
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 526
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 418
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 68
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 570
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 350
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 70
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 580
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 56
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 575
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 200
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 63
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 2
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 573
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 278
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 30
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 535
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 350
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.RunePageEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.ToTable("RunePages");
+
+ b.HasData(
+ new
+ {
+ Name = "Page 1"
+ },
+ new
+ {
+ Name = "Page 2"
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.LargeImageEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("Base64")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("LargeImages");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Base64 = "empty"
+ },
+ new
+ {
+ Id = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"),
+ Base64 = " "
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.RuneEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Family")
+ .HasColumnType("INTEGER");
+
+ b.Property("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ImageId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex("ImageId");
+
+ b.ToTable("Runes");
+
+ b.HasData(
+ new
+ {
+ Name = "Hextech Flashtraption ",
+ Description = "While Flash is on cooldown, it is replaced by Hexflash.",
+ Family = 0,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65")
+ },
+ new
+ {
+ Name = "Manaflow Band ",
+ Description = "Hitting enemy champions with a spell grants 25 maximum mana, up to 250 mana.",
+ Family = 2,
+ Icon = "",
+ ImageId = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c")
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.SkillEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("ChampionForeignKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Type")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Name");
+
+ b.HasIndex("ChampionForeignKey");
+
+ b.ToTable("Skills");
+
+ b.HasData(
+ new
+ {
+ Name = "Boule de feu",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Description = "Fire!",
+ Type = 1
+ },
+ new
+ {
+ Name = "White Star",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Description = "Random damage",
+ Type = 3
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.SkinEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(254)
+ .HasColumnType("TEXT");
+
+ b.Property("ChampionForeignKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ImageId")
+ .HasColumnType("TEXT");
+
+ b.Property("Price")
+ .HasColumnType("REAL");
+
+ b.HasKey("Name");
+
+ b.HasIndex("ChampionForeignKey");
+
+ b.HasIndex("ImageId");
+
+ b.ToTable("Skins");
+
+ b.HasData(
+ new
+ {
+ Name = "Akali Infernale",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Description = "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.",
+ Icon = "empty",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Price = 520f
+ },
+ new
+ {
+ Name = "Akshan Cyberpop",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Description = "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.",
+ Icon = "empty",
+ ImageId = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"),
+ Price = 1350f
+ });
+ });
+
+ modelBuilder.Entity("ChampionEntityRunePageEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", null)
+ .WithMany()
+ .HasForeignKey("ChampionsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MyFlib.Entities.RunePageEntity", null)
+ .WithMany()
+ .HasForeignKey("RunePagesName")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("MyFlib.ChampionEntity", b =>
+ {
+ b.HasOne("MyFlib.LargeImageEntity", "Image")
+ .WithMany()
+ .HasForeignKey("ImageId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Image");
+ });
+
+ modelBuilder.Entity("MyFlib.DictionaryCategoryRune", b =>
+ {
+ b.HasOne("MyFlib.RuneEntity", "rune")
+ .WithMany("DictionaryCategoryRunes")
+ .HasForeignKey("RuneName")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MyFlib.Entities.RunePageEntity", "runePage")
+ .WithMany("DictionaryCategoryRunes")
+ .HasForeignKey("RunePageName")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("rune");
+
+ b.Navigation("runePage");
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.CharacteristicEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", "Champion")
+ .WithMany("Characteristics")
+ .HasForeignKey("ChampionForeignKey")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Champion");
+ });
+
+ modelBuilder.Entity("MyFlib.RuneEntity", b =>
+ {
+ b.HasOne("MyFlib.LargeImageEntity", "Image")
+ .WithMany()
+ .HasForeignKey("ImageId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Image");
+ });
+
+ modelBuilder.Entity("MyFlib.SkillEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", "Champion")
+ .WithMany("Skills")
+ .HasForeignKey("ChampionForeignKey")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Champion");
+ });
+
+ modelBuilder.Entity("MyFlib.SkinEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", "Champion")
+ .WithMany("Skins")
+ .HasForeignKey("ChampionForeignKey")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MyFlib.LargeImageEntity", "Image")
+ .WithMany()
+ .HasForeignKey("ImageId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Champion");
+
+ b.Navigation("Image");
+ });
+
+ modelBuilder.Entity("MyFlib.ChampionEntity", b =>
+ {
+ b.Navigation("Characteristics");
+
+ b.Navigation("Skills");
+
+ b.Navigation("Skins");
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.RunePageEntity", b =>
+ {
+ b.Navigation("DictionaryCategoryRunes");
+ });
+
+ modelBuilder.Entity("MyFlib.RuneEntity", b =>
+ {
+ b.Navigation("DictionaryCategoryRunes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230325153221_myMigration.cs b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230325153221_myMigration.cs
new file mode 100644
index 0000000..c5ed594
--- /dev/null
+++ b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230325153221_myMigration.cs
@@ -0,0 +1,375 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
+
+namespace MyFlib.Migrations
+{
+ ///
+ public partial class myMigration : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "LargeImages",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ Base64 = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_LargeImages", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "RunePages",
+ columns: table => new
+ {
+ Name = table.Column(type: "TEXT", maxLength: 64, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_RunePages", x => x.Name);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Champions",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ Name = table.Column(type: "TEXT", maxLength: 64, nullable: false),
+ Bio = table.Column(type: "TEXT", maxLength: 255, nullable: false),
+ Icon = table.Column(type: "TEXT", nullable: false),
+ Class = table.Column(type: "INTEGER", nullable: false),
+ ImageId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Champions", x => x.Id);
+ table.ForeignKey(
+ name: "FK_Champions_LargeImages_ImageId",
+ column: x => x.ImageId,
+ principalTable: "LargeImages",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Runes",
+ columns: table => new
+ {
+ Name = table.Column(type: "TEXT", maxLength: 64, nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 500, nullable: false),
+ Family = table.Column(type: "INTEGER", nullable: false),
+ Icon = table.Column(type: "TEXT", nullable: false),
+ ImageId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Runes", x => x.Name);
+ table.ForeignKey(
+ name: "FK_Runes_LargeImages_ImageId",
+ column: x => x.ImageId,
+ principalTable: "LargeImages",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "ChampionEntityRunePageEntity",
+ columns: table => new
+ {
+ ChampionsId = table.Column(type: "TEXT", nullable: false),
+ RunePagesName = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ChampionEntityRunePageEntity", x => new { x.ChampionsId, x.RunePagesName });
+ table.ForeignKey(
+ name: "FK_ChampionEntityRunePageEntity_Champions_ChampionsId",
+ column: x => x.ChampionsId,
+ principalTable: "Champions",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_ChampionEntityRunePageEntity_RunePages_RunePagesName",
+ column: x => x.RunePagesName,
+ principalTable: "RunePages",
+ principalColumn: "Name",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Characteristic",
+ columns: table => new
+ {
+ Name = table.Column(type: "TEXT", maxLength: 254, nullable: false),
+ ChampionForeignKey = table.Column(type: "TEXT", nullable: false),
+ Value = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Characteristic", x => new { x.Name, x.ChampionForeignKey });
+ table.ForeignKey(
+ name: "FK_Characteristic_Champions_ChampionForeignKey",
+ column: x => x.ChampionForeignKey,
+ principalTable: "Champions",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Skills",
+ columns: table => new
+ {
+ Name = table.Column(type: "TEXT", maxLength: 64, nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 500, nullable: false),
+ Type = table.Column(type: "INTEGER", nullable: false),
+ ChampionForeignKey = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Skills", x => x.Name);
+ table.ForeignKey(
+ name: "FK_Skills_Champions_ChampionForeignKey",
+ column: x => x.ChampionForeignKey,
+ principalTable: "Champions",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Skins",
+ columns: table => new
+ {
+ Name = table.Column(type: "TEXT", maxLength: 254, nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 1000, nullable: false),
+ Icon = table.Column(type: "TEXT", nullable: false),
+ Price = table.Column(type: "REAL", nullable: false),
+ ChampionForeignKey = table.Column(type: "TEXT", nullable: false),
+ ImageId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Skins", x => x.Name);
+ table.ForeignKey(
+ name: "FK_Skins_Champions_ChampionForeignKey",
+ column: x => x.ChampionForeignKey,
+ principalTable: "Champions",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_Skins_LargeImages_ImageId",
+ column: x => x.ImageId,
+ principalTable: "LargeImages",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CategoryRunes",
+ columns: table => new
+ {
+ RunePageName = table.Column(type: "TEXT", nullable: false),
+ RuneName = table.Column(type: "TEXT", nullable: false),
+ category = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CategoryRunes", x => new { x.RunePageName, x.RuneName });
+ table.ForeignKey(
+ name: "FK_CategoryRunes_RunePages_RunePageName",
+ column: x => x.RunePageName,
+ principalTable: "RunePages",
+ principalColumn: "Name",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_CategoryRunes_Runes_RuneName",
+ column: x => x.RuneName,
+ principalTable: "Runes",
+ principalColumn: "Name",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.InsertData(
+ table: "LargeImages",
+ columns: new[] { "Id", "Base64" },
+ values: new object[,]
+ {
+ { new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), "empty" },
+ { new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"), " " }
+ });
+
+ migrationBuilder.InsertData(
+ table: "RunePages",
+ column: "Name",
+ values: new object[]
+ {
+ "Page 1",
+ "Page 2"
+ });
+
+ migrationBuilder.InsertData(
+ table: "Champions",
+ columns: new[] { "Id", "Bio", "Class", "Icon", "ImageId", "Name" },
+ values: new object[,]
+ {
+ { new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "", 6, "", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), "Alistar" },
+ { new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "", 4, "", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), "Akshan" },
+ { new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "", 1, "", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), "Akali" },
+ { new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"), "", 5, "", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), "Bard" },
+ { new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "", 2, "", new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"), "Aatrox" },
+ { new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "", 3, "", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), "Ahri" }
+ });
+
+ migrationBuilder.InsertData(
+ table: "Runes",
+ columns: new[] { "Name", "Description", "Family", "Icon", "ImageId" },
+ values: new object[,]
+ {
+ { "Hextech Flashtraption ", "While Flash is on cooldown, it is replaced by Hexflash.", 0, "", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65") },
+ { "Manaflow Band ", "Hitting enemy champions with a spell grants 25 maximum mana, up to 250 mana.", 2, "", new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c") }
+ });
+
+ migrationBuilder.InsertData(
+ table: "CategoryRunes",
+ columns: new[] { "RuneName", "RunePageName", "category" },
+ values: new object[,]
+ {
+ { "Hextech Flashtraption ", "Page 1", 0 },
+ { "Manaflow Band ", "Page 1", 1 },
+ { "Hextech Flashtraption ", "Page 2", 5 },
+ { "Manaflow Band ", "Page 2", 4 }
+ });
+
+ migrationBuilder.InsertData(
+ table: "Characteristic",
+ columns: new[] { "ChampionForeignKey", "Name", "Value" },
+ values: new object[,]
+ {
+ { new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "Ability Power", 0 },
+ { new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Ability Power", 0 },
+ { new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Ability Power", 0 },
+ { new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"), "Ability Power", 30 },
+ { new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "Ability Power", 0 },
+ { new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "Ability Power", 92 },
+ { new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "Attack Damage", 63 },
+ { new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Attack Damage", 68 },
+ { new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Attack Damage", 56 },
+ { new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "Attack Damage", 70 },
+ { new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "Attack Damage", 58 },
+ { new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "Attack Speed", 2 },
+ { new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Attack Speed", 1 },
+ { new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Attack Speed", 1 },
+ { new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"), "Attack Speed", 1 },
+ { new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "Attack Speed", 1 },
+ { new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "Attack Speed", 6 },
+ { new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "Health", 573 },
+ { new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Health", 570 },
+ { new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Health", 575 },
+ { new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"), "Health", 535 },
+ { new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "Health", 580 },
+ { new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "Health", 526 },
+ { new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "Mana", 278 },
+ { new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Mana", 350 },
+ { new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Mana", 200 },
+ { new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"), "Mana", 350 },
+ { new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "Mana", 0 },
+ { new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "Mana", 418 }
+ });
+
+ migrationBuilder.InsertData(
+ table: "Skills",
+ columns: new[] { "Name", "ChampionForeignKey", "Description", "Type" },
+ values: new object[,]
+ {
+ { "Boule de feu", new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Fire!", 1 },
+ { "White Star", new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Random damage", 3 }
+ });
+
+ migrationBuilder.InsertData(
+ table: "Skins",
+ columns: new[] { "Name", "ChampionForeignKey", "Description", "Icon", "ImageId", "Price" },
+ values: new object[,]
+ {
+ { "Akali Infernale", new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.", "empty", new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"), 520f },
+ { "Akshan Cyberpop", new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.", "empty", new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"), 1350f }
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CategoryRunes_RuneName",
+ table: "CategoryRunes",
+ column: "RuneName");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_ChampionEntityRunePageEntity_RunePagesName",
+ table: "ChampionEntityRunePageEntity",
+ column: "RunePagesName");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Champions_ImageId",
+ table: "Champions",
+ column: "ImageId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Characteristic_ChampionForeignKey",
+ table: "Characteristic",
+ column: "ChampionForeignKey");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Runes_ImageId",
+ table: "Runes",
+ column: "ImageId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Skills_ChampionForeignKey",
+ table: "Skills",
+ column: "ChampionForeignKey");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Skins_ChampionForeignKey",
+ table: "Skins",
+ column: "ChampionForeignKey");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Skins_ImageId",
+ table: "Skins",
+ column: "ImageId");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "CategoryRunes");
+
+ migrationBuilder.DropTable(
+ name: "ChampionEntityRunePageEntity");
+
+ migrationBuilder.DropTable(
+ name: "Characteristic");
+
+ migrationBuilder.DropTable(
+ name: "Skills");
+
+ migrationBuilder.DropTable(
+ name: "Skins");
+
+ migrationBuilder.DropTable(
+ name: "Runes");
+
+ migrationBuilder.DropTable(
+ name: "RunePages");
+
+ migrationBuilder.DropTable(
+ name: "Champions");
+
+ migrationBuilder.DropTable(
+ name: "LargeImages");
+ }
+ }
+}
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs
new file mode 100644
index 0000000..3a1cbfe
--- /dev/null
+++ b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs
@@ -0,0 +1,668 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using MyFlib;
+
+#nullable disable
+
+namespace MyFlib.Migrations
+{
+ [DbContext(typeof(LolDbContext))]
+ partial class LolDbContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
+
+ modelBuilder.Entity("ChampionEntityRunePageEntity", b =>
+ {
+ b.Property("ChampionsId")
+ .HasColumnType("TEXT");
+
+ b.Property("RunePagesName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("ChampionsId", "RunePagesName");
+
+ b.HasIndex("RunePagesName");
+
+ b.ToTable("ChampionEntityRunePageEntity");
+ });
+
+ modelBuilder.Entity("MyFlib.ChampionEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("Bio")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property("Class")
+ .HasColumnType("INTEGER");
+
+ b.Property("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ImageId")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ImageId");
+
+ b.ToTable("Champions");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Bio = "",
+ Class = 1,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Akali"
+ },
+ new
+ {
+ Id = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Bio = "",
+ Class = 2,
+ Icon = "",
+ ImageId = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"),
+ Name = "Aatrox"
+ },
+ new
+ {
+ Id = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Bio = "",
+ Class = 3,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Ahri"
+ },
+ new
+ {
+ Id = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Bio = "",
+ Class = 4,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Akshan"
+ },
+ new
+ {
+ Id = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Bio = "",
+ Class = 5,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Bard"
+ },
+ new
+ {
+ Id = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Bio = "",
+ Class = 6,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Name = "Alistar"
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.DictionaryCategoryRune", b =>
+ {
+ b.Property("RunePageName")
+ .HasColumnType("TEXT");
+
+ b.Property("RuneName")
+ .HasColumnType("TEXT");
+
+ b.Property("category")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("RunePageName", "RuneName");
+
+ b.HasIndex("RuneName");
+
+ b.ToTable("CategoryRunes");
+
+ b.HasData(
+ new
+ {
+ RunePageName = "Page 1",
+ RuneName = "Hextech Flashtraption ",
+ category = 0
+ },
+ new
+ {
+ RunePageName = "Page 1",
+ RuneName = "Manaflow Band ",
+ category = 1
+ },
+ new
+ {
+ RunePageName = "Page 2",
+ RuneName = "Manaflow Band ",
+ category = 4
+ },
+ new
+ {
+ RunePageName = "Page 2",
+ RuneName = "Hextech Flashtraption ",
+ category = 5
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.CharacteristicEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(254)
+ .HasColumnType("TEXT");
+
+ b.Property("ChampionForeignKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Name", "ChampionForeignKey");
+
+ b.HasIndex("ChampionForeignKey");
+
+ b.ToTable("Characteristic");
+
+ b.HasData(
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 58
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 92
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 6
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 526
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
+ Value = 418
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 68
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 570
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Value = 350
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 70
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 580
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 56
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 575
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Value = 200
+ },
+ new
+ {
+ Name = "Attack Damage",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 63
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 0
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 2
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 573
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
+ Value = 278
+ },
+ new
+ {
+ Name = "Ability Power",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 30
+ },
+ new
+ {
+ Name = "Attack Speed",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 1
+ },
+ new
+ {
+ Name = "Health",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 535
+ },
+ new
+ {
+ Name = "Mana",
+ ChampionForeignKey = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
+ Value = 350
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.RunePageEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.ToTable("RunePages");
+
+ b.HasData(
+ new
+ {
+ Name = "Page 1"
+ },
+ new
+ {
+ Name = "Page 2"
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.LargeImageEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("Base64")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("LargeImages");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Base64 = "empty"
+ },
+ new
+ {
+ Id = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"),
+ Base64 = " "
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.RuneEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Family")
+ .HasColumnType("INTEGER");
+
+ b.Property("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ImageId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex("ImageId");
+
+ b.ToTable("Runes");
+
+ b.HasData(
+ new
+ {
+ Name = "Hextech Flashtraption ",
+ Description = "While Flash is on cooldown, it is replaced by Hexflash.",
+ Family = 0,
+ Icon = "",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65")
+ },
+ new
+ {
+ Name = "Manaflow Band ",
+ Description = "Hitting enemy champions with a spell grants 25 maximum mana, up to 250 mana.",
+ Family = 2,
+ Icon = "",
+ ImageId = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c")
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.SkillEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("ChampionForeignKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Type")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Name");
+
+ b.HasIndex("ChampionForeignKey");
+
+ b.ToTable("Skills");
+
+ b.HasData(
+ new
+ {
+ Name = "Boule de feu",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Description = "Fire!",
+ Type = 1
+ },
+ new
+ {
+ Name = "White Star",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Description = "Random damage",
+ Type = 3
+ });
+ });
+
+ modelBuilder.Entity("MyFlib.SkinEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(254)
+ .HasColumnType("TEXT");
+
+ b.Property("ChampionForeignKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ImageId")
+ .HasColumnType("TEXT");
+
+ b.Property("Price")
+ .HasColumnType("REAL");
+
+ b.HasKey("Name");
+
+ b.HasIndex("ChampionForeignKey");
+
+ b.HasIndex("ImageId");
+
+ b.ToTable("Skins");
+
+ b.HasData(
+ new
+ {
+ Name = "Akali Infernale",
+ ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
+ Description = "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.",
+ Icon = "empty",
+ ImageId = new Guid("8d121cdc-6787-4738-8edd-9e026ac16b65"),
+ Price = 520f
+ },
+ new
+ {
+ Name = "Akshan Cyberpop",
+ ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
+ Description = "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.",
+ Icon = "empty",
+ ImageId = new Guid("9f9086f5-5cc5-47b5-af9b-a935f4e9b89c"),
+ Price = 1350f
+ });
+ });
+
+ modelBuilder.Entity("ChampionEntityRunePageEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", null)
+ .WithMany()
+ .HasForeignKey("ChampionsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MyFlib.Entities.RunePageEntity", null)
+ .WithMany()
+ .HasForeignKey("RunePagesName")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("MyFlib.ChampionEntity", b =>
+ {
+ b.HasOne("MyFlib.LargeImageEntity", "Image")
+ .WithMany()
+ .HasForeignKey("ImageId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Image");
+ });
+
+ modelBuilder.Entity("MyFlib.DictionaryCategoryRune", b =>
+ {
+ b.HasOne("MyFlib.RuneEntity", "rune")
+ .WithMany("DictionaryCategoryRunes")
+ .HasForeignKey("RuneName")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MyFlib.Entities.RunePageEntity", "runePage")
+ .WithMany("DictionaryCategoryRunes")
+ .HasForeignKey("RunePageName")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("rune");
+
+ b.Navigation("runePage");
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.CharacteristicEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", "Champion")
+ .WithMany("Characteristics")
+ .HasForeignKey("ChampionForeignKey")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Champion");
+ });
+
+ modelBuilder.Entity("MyFlib.RuneEntity", b =>
+ {
+ b.HasOne("MyFlib.LargeImageEntity", "Image")
+ .WithMany()
+ .HasForeignKey("ImageId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Image");
+ });
+
+ modelBuilder.Entity("MyFlib.SkillEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", "Champion")
+ .WithMany("Skills")
+ .HasForeignKey("ChampionForeignKey")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Champion");
+ });
+
+ modelBuilder.Entity("MyFlib.SkinEntity", b =>
+ {
+ b.HasOne("MyFlib.ChampionEntity", "Champion")
+ .WithMany("Skins")
+ .HasForeignKey("ChampionForeignKey")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MyFlib.LargeImageEntity", "Image")
+ .WithMany()
+ .HasForeignKey("ImageId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Champion");
+
+ b.Navigation("Image");
+ });
+
+ modelBuilder.Entity("MyFlib.ChampionEntity", b =>
+ {
+ b.Navigation("Characteristics");
+
+ b.Navigation("Skills");
+
+ b.Navigation("Skins");
+ });
+
+ modelBuilder.Entity("MyFlib.Entities.RunePageEntity", b =>
+ {
+ b.Navigation("DictionaryCategoryRunes");
+ });
+
+ modelBuilder.Entity("MyFlib.RuneEntity", b =>
+ {
+ b.Navigation("DictionaryCategoryRunes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/MyFlib.csproj b/src/EntityFramework_LoL/Sources/MyFlib/MyFlib.csproj
index effa3a7..d3c5f6a 100644
--- a/src/EntityFramework_LoL/Sources/MyFlib/MyFlib.csproj
+++ b/src/EntityFramework_LoL/Sources/MyFlib/MyFlib.csproj
@@ -1,7 +1,6 @@
- Exe
net6.0
enable
enable
diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Program.cs b/src/EntityFramework_LoL/Sources/MyFlib/Program.cs
index a1a700c..4143966 100644
--- a/src/EntityFramework_LoL/Sources/MyFlib/Program.cs
+++ b/src/EntityFramework_LoL/Sources/MyFlib/Program.cs
@@ -1,5 +1,5 @@
// See https://aka.ms/new-console-template for more information
-using MyFlib;
+/*using MyFlib;
using static System.Console;
using (var context = new LolDbContext())
@@ -35,4 +35,4 @@ using (var context = new LolDbContext())
}
context.SaveChangesAsync(); // or context.SaveChangesAsync
-}
\ No newline at end of file
+}*/
\ No newline at end of file