Préparation dans program des services
continuous-integration/drone/push Build is failing Details

pull/6/head
Leni BEAULATON 3 weeks ago
parent fee5b07fac
commit f7f0be36e5

@ -10,12 +10,12 @@ using System.Threading.Tasks;
namespace Contextlib
{
public class DbCommentManager : ICommentService<Commentary>
public class DbCommentaryManager : ICommentService<Commentary>
{
private WTFContext _context;
private GenericRepository<Commentary> _repo;
public DbCommentManager(WTFContext context)
public DbCommentaryManager(WTFContext context)
{
_context = context ?? throw new ArgumentNullException(nameof(context), "Database context cannot be null.");
_repo = new GenericRepository<Commentary>(context);

@ -8,12 +8,17 @@ using ServicesApi;
var builder = WebApplication.CreateBuilder(args);
//API
builder.Services.AddScoped<IUserService<UserDTO>, UserService>();
builder.Services.AddScoped<IQuoteService<QuoteDTO>, QuoteServiceStub>();
builder.Services.AddScoped<IQuoteService<QuoteDTO>, QuoteServiceStub>(); // Retirer "Stub"
//EF
builder.Services.AddScoped<WTFContext, StubWTFContext>();
builder.Services.AddScoped<IUserService<Users>, DbUsersManager>();
// builder.Services.AddScoped<IUserService<Quote>, DbQuoteManager>(); Quand DbQuoteManager sera présent
//builder.Services.AddScoped<IUserService<Character>, DbCharacterManager>();
//builder.Services.AddScoped<IUserService<Commentary>, DbCommentaryManager>();
//...
// Add services to the container.
builder.Services.AddControllers();

Loading…
Cancel
Save