From f7f0be36e59ca07dcdb422dbca4c3cc40cc4ca3d Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Fri, 28 Mar 2025 12:00:32 +0100 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9paration=20dans=20program=20des=20servi?= =?UTF-8?q?ces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WF_EF_Api/Contextlib/DbCommentaryManager.cs | 4 ++-- WF_EF_Api/WfApi/Program.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/WF_EF_Api/Contextlib/DbCommentaryManager.cs b/WF_EF_Api/Contextlib/DbCommentaryManager.cs index c498637..c866245 100644 --- a/WF_EF_Api/Contextlib/DbCommentaryManager.cs +++ b/WF_EF_Api/Contextlib/DbCommentaryManager.cs @@ -10,12 +10,12 @@ using System.Threading.Tasks; namespace Contextlib { - public class DbCommentManager : ICommentService + public class DbCommentaryManager : ICommentService { private WTFContext _context; private GenericRepository _repo; - public DbCommentManager(WTFContext context) + public DbCommentaryManager(WTFContext context) { _context = context ?? throw new ArgumentNullException(nameof(context), "Database context cannot be null."); _repo = new GenericRepository(context); diff --git a/WF_EF_Api/WfApi/Program.cs b/WF_EF_Api/WfApi/Program.cs index 524f35a..01c0c1e 100644 --- a/WF_EF_Api/WfApi/Program.cs +++ b/WF_EF_Api/WfApi/Program.cs @@ -8,12 +8,17 @@ using ServicesApi; var builder = WebApplication.CreateBuilder(args); //API builder.Services.AddScoped, UserService>(); -builder.Services.AddScoped, QuoteServiceStub>(); +builder.Services.AddScoped, QuoteServiceStub>(); // Retirer "Stub" //EF builder.Services.AddScoped(); builder.Services.AddScoped, DbUsersManager>(); +// builder.Services.AddScoped, DbQuoteManager>(); Quand DbQuoteManager sera présent +//builder.Services.AddScoped, DbCharacterManager>(); +//builder.Services.AddScoped, DbCommentaryManager>(); +//... + // Add services to the container. builder.Services.AddControllers();