From c72adccc1ad4e4d33984bf6814291c88650539dc Mon Sep 17 00:00:00 2001
From: Pierre Ferreira
Date: Fri, 3 Mar 2023 14:47:06 +0100
Subject: [PATCH] tentative de reglage du probleme des tests suite a l'ajout
des skin, voir pour le One to Many ??
---
Sources/EF_UT/EntityTest.cs | 3 ++-
Sources/EntityFramework/ChampionEntity.cs | 3 +++
Sources/EntityFramework/SkinEntity.cs | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Sources/EF_UT/EntityTest.cs b/Sources/EF_UT/EntityTest.cs
index d1f87b5..f162b09 100644
--- a/Sources/EF_UT/EntityTest.cs
+++ b/Sources/EF_UT/EntityTest.cs
@@ -27,7 +27,8 @@ namespace EF_UT
ChampionEntity yoda = new ChampionEntity("Yoda", "", "");
ChampionEntity ewok = new ChampionEntity("Ewok", "", "");
-
+ //SkinEntity defaulSkin = new SkinEntity("Skin Default", chewie);
+ //chewie.AddSkin(defaulSkin);
Console.WriteLine("Creates and inserts new Champion for tests");
context.Add(chewie);
context.Add(yoda);
diff --git a/Sources/EntityFramework/ChampionEntity.cs b/Sources/EntityFramework/ChampionEntity.cs
index bc8de94..8822711 100644
--- a/Sources/EntityFramework/ChampionEntity.cs
+++ b/Sources/EntityFramework/ChampionEntity.cs
@@ -37,6 +37,9 @@ namespace EntityFramework
public ReadOnlyCollection Skins { get; private set; }
private List skins = new();
+ public LargeImageEntity Image { get; set; }
+
+
public ChampionEntity(string name,string bio,string icon) {
this.Name = name;
this.Bio = bio;
diff --git a/Sources/EntityFramework/SkinEntity.cs b/Sources/EntityFramework/SkinEntity.cs
index a71c5ea..adcf35c 100644
--- a/Sources/EntityFramework/SkinEntity.cs
+++ b/Sources/EntityFramework/SkinEntity.cs
@@ -58,7 +58,7 @@ namespace EntityFramework
{
Name = name;
Champion = champion;
- Champion.AddSkin(this);
+ //Champion.AddSkin(this);
Price = price;
Icon = icon;
Image = new LargeImageEntity(image);