diff --git a/Webzine.Entity/Fixtures/ArtisteFactory.cs b/Webzine.Entity/Fixtures/ArtisteFactory.cs
index 44f297a..d8ecb26 100644
--- a/Webzine.Entity/Fixtures/ArtisteFactory.cs
+++ b/Webzine.Entity/Fixtures/ArtisteFactory.cs
@@ -49,20 +49,5 @@ namespace Webzine.Entity.Fixtures
return artisteFaker.Generate();
}
-
- ///
- /// Permet de retourner une liste d'artiste pour seeder la base
- /// de données.
- ///
- ///
- /// Liste d'artiste.
- public static List CreerListeArtiste(int nombre)
- {
- Faker faker = new Faker("fr")
- .RuleFor(a => a.Nom, f => f.Person.FullName)
- .RuleFor(a => a.Biographie, f => f.Lorem.Paragraph(2));
-
- return faker.Generate(nombre);
- }
}
}
\ No newline at end of file
diff --git a/Webzine.Entity/Fixtures/CommentaireFactory.cs b/Webzine.Entity/Fixtures/CommentaireFactory.cs
index 790cfc2..c798b36 100644
--- a/Webzine.Entity/Fixtures/CommentaireFactory.cs
+++ b/Webzine.Entity/Fixtures/CommentaireFactory.cs
@@ -8,26 +8,6 @@ namespace Webzine.Entity.Fixtures
{
public class CommentaireFactory
{
- ///
- /// Seeder pour la base de données.
- ///
- /// Titre.
- /// Min.
- /// Max.
- /// Liste de commentaire.
- public static List CreerListeCommentaire(Titre titre, int min = 0, int max = 5)
- {
- Random random = new Random();
- int count = random.Next(min, max + 1);
-
- Faker faker = new Faker("fr")
- .RuleFor(c => c.Auteur, f => f.Internet.UserName())
- .RuleFor(c => c.Contenu, f => f.Lorem.Sentences(2))
- .RuleFor(c => c.DateCreation, f => f.Date.Recent(60))
- .RuleFor(c => c.Titre, _ => titre)
- .RuleFor(c => c.IdTitre, _ => titre.IdTitre);
-
- return faker.Generate(count);
- }
+
}
}
diff --git a/Webzine.Entity/Fixtures/SeedDataLocal.cs b/Webzine.Entity/Fixtures/SeedDataLocal.cs
index 544b730..9b69c5f 100644
--- a/Webzine.Entity/Fixtures/SeedDataLocal.cs
+++ b/Webzine.Entity/Fixtures/SeedDataLocal.cs
@@ -3,12 +3,151 @@
//
namespace Webzine.Entity.Fixtures
-{
+{
+ using Bogus;
public class SeedDataLocal
{
public SeedDataLocal()
{
}
+
+ ///
+ /// Generer une liste d'artiste.
+ ///
+ /// Nombre d'artiste.
+ /// Liste d'artiste.
+ public static List GenererListeArtiste(int nombre)
+ {
+ Faker artistes = new Faker("fr")
+ .RuleFor(a => a.Nom, f => f.Person.FullName)
+ .RuleFor(a => a.Biographie, f => f.Lorem.Paragraph(2));
+
+ return artistes.Generate(nombre);
+ }
+
+ ///
+ /// Generer une liste de titre.
+ ///
+ /// Nombre de titre à créer.
+ /// Liste d'artiste.
+ /// Liste de style.
+ /// Liste de titre.
+ public static List GenererListeTitre(
+ int count,
+ List artistes,
+ List