From c330cc78634449c1641fb6e7d331d39bfb733b09 Mon Sep 17 00:00:00 2001
From: mirage <119869686+ClementBobin@users.noreply.github.com>
Date: Fri, 27 Mar 2026 16:23:21 +0100
Subject: [PATCH] =?UTF-8?q?refactor:=20optimiser=20la=20logique=20de=20g?=
=?UTF-8?q?=C3=A9n=C3=A9ration=20de=20commentaires=20dans=20SeedDataLocal?=
=?UTF-8?q?=20et=20les=20fichiers=20associ=C3=A9s?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Webzine.Repository/LocalArtisteRepository.cs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Webzine.Repository/LocalArtisteRepository.cs b/Webzine.Repository/LocalArtisteRepository.cs
index 4f153dc..55e5a89 100644
--- a/Webzine.Repository/LocalArtisteRepository.cs
+++ b/Webzine.Repository/LocalArtisteRepository.cs
@@ -59,7 +59,16 @@ namespace Webzine.Repository
///
public Artiste FindByName(string nom)
{
- return this.dataStore.Artistes.First(a => a.Nom == nom);
+ var artiste = this.dataStore.Artistes.FirstOrDefault(a => a.Nom == nom);
+
+ if (artiste != null)
+ {
+ artiste.Titres = this.dataStore.Titres
+ .Where(t => t.IdArtiste == artiste.IdArtiste)
+ .ToList();
+ }
+
+ return artiste;
}
///