From 7f5bfd1bb81ccc31d18a86fa4abbae1eafa3f9cb Mon Sep 17 00:00:00 2001 From: "josephine.vetu" Date: Fri, 27 Mar 2026 13:24:00 +0100 Subject: [PATCH] =?UTF-8?q?#131=20Fix=20de=20l'affichage=20des=20modificat?= =?UTF-8?q?ions=20car=20les=20id=20de=20tous=20les=20=C3=A9l=C3=A9ments=20?= =?UTF-8?q?des=20listes=20sont=20=C3=A9gaux=20=C3=A0=200.=20Ajout=20de=20l?= =?UTF-8?q?a=20g=C3=A9n=C3=A9ration=20des=20id=20dans=20la=20SeedDbLocal?= =?UTF-8?q?=20+=20les=20commentaires=20sont=20ajout=C3=A9s=20aux=20titres?= =?UTF-8?q?=20directement=20dans=20le=20seed.=20Correction=20de=20document?= =?UTF-8?q?ation=20de=20m=C3=A9thodes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Webzine.Entity/Fixtures/SeedDataLocal.cs | 48 +++++++++++++------ Webzine.Repository/DbEntityRepository.cs | 22 ++------- Webzine.Repository/InMemoryDataStore.cs | 27 +++++++++-- .../Controllers/TitreController.cs | 8 ++-- .../ViewModels/Titre/AdminTitreList.cs | 2 +- .../Administration/Views/Titre/Index.cshtml | 2 +- Webzine.WebApplication/Program.cs | 3 +- 7 files changed, 67 insertions(+), 45 deletions(-) diff --git a/Webzine.Entity/Fixtures/SeedDataLocal.cs b/Webzine.Entity/Fixtures/SeedDataLocal.cs index 0480382..4ad82da 100644 --- a/Webzine.Entity/Fixtures/SeedDataLocal.cs +++ b/Webzine.Entity/Fixtures/SeedDataLocal.cs @@ -19,7 +19,9 @@ namespace Webzine.Entity.Fixtures /// Liste d'artiste. public static List GenererListeArtiste(int nombre) { + int idStart = 1; Faker artistes = new Faker("fr") + .RuleFor(a => a.IdArtiste, f => f.IndexFaker + idStart) // Créé les id des artistes de manière incrémentale .RuleFor(a => a.Nom, f => f.Person.FullName) .RuleFor(a => a.Biographie, f => f.Lorem.Paragraph(2)); @@ -27,21 +29,27 @@ namespace Webzine.Entity.Fixtures } /// - /// Generer une liste de titre. + /// Generer une liste de titres. /// - /// Nombre de titre à créer. - /// Liste d'artiste. - /// Liste de style. - /// Liste de titre. + /// Nombre de titres à créer. + /// Liste d'artistes. + /// Liste de styles. + /// Liste d'albums. + /// Liste de commentaires. + /// Liste de titres. public static List GenererListeTitre( int count, List artistes, List