This commit is contained in:
josephine.vetu
2026-03-31 13:53:42 +02:00
parent 727d29889a
commit b2dc449adb
11 changed files with 30 additions and 21 deletions

View File

@@ -34,7 +34,9 @@ public class LocalTitreRepository : ITitreRepository
/// <inheritdoc/>
public int Count()
{
var count = this.dataStore.Titres.Count();
var count = this.dataStore.Titres.Count(); // TODO une seule ligne, et attention car les deux méthodes s'appelent pareil,
// il faut faire attention à ne pas confondre avec la méthode Count() de l'interface ITitreRepository
return count;
}
@@ -62,14 +64,14 @@ public class LocalTitreRepository : ITitreRepository
/// <inheritdoc/>
public void IncrementNbLikes(Titre titre)
{
titre.NbLikes++;
titre.NbLikes++; // TODO rien n'est enregistré
}
/// <inheritdoc/>
public IEnumerable<Titre> Search(string mot)
{
return this.dataStore.Titres
.Where(t => t.Libelle != null && t.Libelle.Contains(mot));
.Where(t => t.Libelle != null && t.Libelle.Contains(mot)); // TODO attention au null, et à la casse, et à l'indexation pour les performances
}
/// <inheritdoc/>