Fix. Ajout de LodDegub au lieu de LogInformation. Ajout de this. aux redirections de vues.
This commit is contained in:
@@ -63,7 +63,7 @@ namespace Webzine.Repository
|
||||
|
||||
this.context.Artistes.Remove(artiste);
|
||||
this.context.SaveChanges();
|
||||
this.logger.LogInformation("L'artiste {IdArtiste} a bien été supprimé", artiste.IdArtiste);
|
||||
this.logger.LogDebug("L'artiste {IdArtiste} a bien été supprimé", artiste.IdArtiste);
|
||||
}
|
||||
catch (DbUpdateException dbex)
|
||||
{
|
||||
@@ -125,7 +125,7 @@ namespace Webzine.Repository
|
||||
{
|
||||
// .AsNoTracking() rend la requête beaucoup plus rapide pour de la lecture
|
||||
var artistes = this.context.Artistes.AsNoTracking().ToList();
|
||||
this.logger.LogInformation("{Count} artistes récupérés de la base.", artistes.Count);
|
||||
this.logger.LogDebug("{Count} artistes récupérés de la base.", artistes.Count);
|
||||
return artistes;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -147,7 +147,7 @@ namespace Webzine.Repository
|
||||
{
|
||||
this.context.Artistes.Update(artiste);
|
||||
this.context.SaveChanges();
|
||||
this.logger.LogInformation("Artiste {Id} ({Nom}) mis à jour avec succès.", artiste.IdArtiste, artiste.Nom);
|
||||
this.logger.LogDebug("Artiste {Id} ({Nom}) mis à jour avec succès.", artiste.IdArtiste, artiste.Nom);
|
||||
}
|
||||
catch (DbUpdateException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user