Aucune description

DependencyInjectionService.cs 1.0KB

123456789101112131415161718192021222324252627282930
  1. using Backend.ApplicationCore.Interfaces.IServices;
  2. using Backend.ApplicationCore.Services;
  3. using Microsoft.AspNetCore.Builder;
  4. using Microsoft.AspNetCore.Http;
  5. using Microsoft.Extensions.DependencyInjection;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. using System.Linq;
  10. using System.Reflection;
  11. using System.Threading.Tasks;
  12. namespace Backend.API.Config
  13. {
  14. internal static class DependencyInjectionService
  15. {
  16. internal static IServiceCollection AddDependencyInjectionService(this IServiceCollection services)
  17. {
  18. services.AddScoped<ITypeProprieteService, TypeProprieteService>();
  19. services.AddScoped<IProprieteService, ProprieteService>();
  20. services.AddScoped<IProduitService, ProduitService>();
  21. services.AddScoped<ICommandeService, CommandeService>();
  22. services.AddScoped<ILigneCommandeService, LigneCommandeService>();
  23. services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
  24. return services;
  25. }
  26. }
  27. }

Powered by TurnKey Linux.