#146 Erreur de rebase supprimées (lignes dupliquées. Ajout de AsNoTracking pour toutes les opérations de READ sur la bdd. Modification de la méthode Count().
This commit is contained in:
@@ -84,6 +84,7 @@ public class DbCommentaireRepository : ICommentaireRepository
|
||||
public IEnumerable<Commentaire> FindAll()
|
||||
{
|
||||
var commentaires = this.context.Commentaires
|
||||
.AsNoTracking()
|
||||
.Include(c => c.Titre)
|
||||
.OrderByDescending(c => c.DateCreation)
|
||||
.ToList();
|
||||
@@ -98,6 +99,7 @@ public class DbCommentaireRepository : ICommentaireRepository
|
||||
this.logger.LogDebug("Recherche paginée des commentaires (offset : {Offset}, limit : {Limit})", offset, limit);
|
||||
|
||||
var commentaires = this.context.Commentaires
|
||||
.AsNoTracking()
|
||||
.Include(c => c.Titre)
|
||||
.OrderByDescending(c => c.DateCreation)
|
||||
.Skip(offset)
|
||||
|
||||
Reference in New Issue
Block a user