refactor: optimiser la logique de génération de commentaires dans SeedDataLocal et les fichiers associés

This commit is contained in:
mirage
2026-03-27 15:07:40 +01:00
parent 30631676f8
commit 1eb8e93bfc
3 changed files with 17 additions and 11 deletions

View File

@@ -99,11 +99,13 @@ try
var styles = SeedDataLocal.GenererListeStyle(15, 20);
var albums = SeedDataLocal.GenererListeAlbums(50);
var commentaires = new List<Commentaire>();
var titres = SeedDataLocal.GenererListeTitre(500, artistes, styles, albums, commentaires);
var titres = SeedDataLocal.GenererListeTitre(500, artistes, styles, albums);
foreach (var titre in titres)
{
commentaires.AddRange(SeedDataLocal.GenererListeCommentaire(titre, 0, 5));
var commentairesForTitre = SeedDataLocal.GenererListeCommentaire(titre, 0, 5);
titre.Commentaires.AddRange(commentairesForTitre);
commentaires.AddRange(commentairesForTitre);
}
store.Artistes.AddRange(artistes);