Commande dotnet format

This commit is contained in:
josephine.vetu
2026-03-28 10:09:18 +01:00
parent 291a008d8d
commit d5dd75ed9d
51 changed files with 265 additions and 228 deletions

View File

@@ -5,8 +5,10 @@
namespace Webzine.Repository
{
using System.Data.Common;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Webzine.EntitiesContext;
using Webzine.Entity;
using Webzine.Repository.Contracts;
@@ -17,7 +19,7 @@ namespace Webzine.Repository
/// </summary>
public class DbArtisteRepository : IArtisteRepository
{
private WebzineDbContext context;
private readonly WebzineDbContext context;
private readonly ILogger<LocalArtisteRepository> logger;
/// <summary>
@@ -115,7 +117,7 @@ namespace Webzine.Repository
/// <inheritdoc/>
public IEnumerable<Artiste> FindAll()
{
try
try
{
// .AsNoTracking() rend la requête beaucoup plus rapide pour de la lecture
var artistes = this.context.Artistes.AsNoTracking().ToList();
@@ -127,15 +129,15 @@ namespace Webzine.Repository
this.logger.LogError(ex, "Erreur lors de la récupération de tous les artistes.");
return Enumerable.Empty<Artiste>(); // Retourne une liste vide au lieu de faire crash l'UI
}
}
}
/// <inheritdoc/>
public void Update(Artiste artiste)
{
if (artiste == null)
{
throw new ArgumentNullException(nameof(artiste));
}
{
throw new ArgumentNullException(nameof(artiste));
}
try
{