You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BusinessConfigurationExtension.cs 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. namespace Diligent.WebAPI.Host.Extensions
  2. {
  3. public static class BusinessConfigurationExtension
  4. {
  5. /// <summary>
  6. /// Services configuration
  7. /// </summary>
  8. public static void ConfigureBusiness(this WebApplicationBuilder builder)
  9. {
  10. IServiceCollection services = builder.Services;
  11. services.AddAutoMapper(typeof(CompanyMappingProfile));
  12. services.AddAutoMapper(typeof(WebhookMappingProfile));
  13. services.AddAutoMapper(typeof(InsurerMappingProfile));
  14. services.AddAutoMapper(typeof(ApplicantMappingProfile));
  15. services.AddAutoMapper(typeof(CommentMappingProfile));
  16. services.AddAutoMapper(typeof(SelectionProcessMappingProfile));
  17. services.AddAutoMapper(typeof(SelectionLevelMappingProfile));
  18. services.AddScoped<IInsurersService, InsurersService>();
  19. services.AddScoped<IEmailer, Emailer>();
  20. services.AddScoped<IHttpClientService, HttpClientService>();
  21. services.AddScoped<IInsuranceCompaniesService, InsuranceCompaniesService>();
  22. services.AddScoped<IInsurancePoliciesService, InsurancePoliciesService>();
  23. services.AddScoped<ISelectionProcessService, SelectionProcessService>();
  24. services.AddScoped<ISelectionLevelService, SelectionLevelService>();
  25. services.AddScoped<IWebhookSubscriptionService, WebhookSubscriptionService>();
  26. services.AddScoped<IWebhookDefinitionService, WebhookDefinitionService>();
  27. services.AddScoped<IWebhookPublisherService, WebhookPublisherService>();
  28. services.AddScoped<IWebhookPublisherService, WebhookPublisherService>();
  29. services.AddScoped<IApplicantService, ApplicantService>();
  30. services.AddScoped<IAuthenticationService, AuthenticationService>();
  31. services.AddScoped<IAdService, AdService>();
  32. services.AddScoped<ITechnologyService, TechnologyService>();
  33. services.AddScoped<ICommentService, CommentService>();
  34. services.AddScoped<IPatternService, PatternService>();
  35. services.AddScoped<IScheduleService, ScheduleService>();
  36. services.AddScoped<IImportService, ImportService>();
  37. services.AddScoped<ISaveImportedDataService, SaveImportedDataService>();
  38. services.AddScoped<IScreeningTestService, ScreeningTestService>();
  39. services.AddScoped<IFileService, FileService>();
  40. }
  41. /// <summary>
  42. /// App configuration
  43. /// </summary>
  44. public static void ConfigureBusiness(this WebApplication app)
  45. {
  46. //
  47. }
  48. }
  49. }