Sin descripción

DependencyInjectionRepository.cs 937B

1234567891011121314151617181920212223
  1. using Backend.ApplicationCore.Interfaces.IRepositories;
  2. using Backend.Infrastructure.Repositories;
  3. using Backend.Persistence.Config;
  4. using Microsoft.Extensions.DependencyInjection;
  5. namespace Backend.API.Config
  6. {
  7. internal static class DependencyInjectionRepository
  8. {
  9. internal static IServiceCollection AddDataDependencyInjectionRepository(this IServiceCollection services)
  10. {
  11. services.AddScoped<IApplicationDatabaseContext, ApplicationDatabaseContext>();
  12. services.AddScoped<ICommandeRepository, CommandeRepository>();
  13. services.AddScoped<ILigneCommandeRepository, LigneCommandeRepository>();
  14. services.AddScoped<IProduitRepository, ProduitRepository>();
  15. services.AddScoped<IProprieteRepository, ProprieteRepository>();
  16. services.AddScoped<ITypeProprieteRepository, TypeProprieteRepository>();
  17. return services;
  18. }
  19. }
  20. }

Powered by TurnKey Linux.