// // Copyright (c) PlaceholderCompany. All rights reserved. // namespace Webzine.Repository { using Webzine.EntitiesContext; using Webzine.Entity; using Webzine.Entity.Fixtures; using Webzine.Repository.Fake; public class DbEntityRepository { private readonly WebzineDbContext context; public DbEntityRepository(WebzineDbContext context) { this.context = context; } public void SeedBaseDeDonnees( int nbArtistes = 100, int nbTitres = 500, int minStyles = 15, int maxStyles = 20, int minCommentairesParTitre = 0, int maxCommentairesParTitre = 5) { if (this.context.Artistes.Any() || this.context.Titres.Any() || this.context.Styles.Any() || this.context.Commentaires.Any()) { return; } List artistes = ArtisteFactory.CreerListeArtiste(nbArtistes); List