選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

BusinessConfigurationExtension.cs 1.2KB

12345678910111213141516171819202122232425262728293031
  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.AddScoped<IInsurersService, InsurersService>();
  15. services.AddScoped<IInsuranceCompaniesService, InsuranceCompaniesService>();
  16. services.AddScoped<IInsurancePoliciesService, InsurancePoliciesService>();
  17. services.AddScoped<IWebhookSubscriptionService, WebhookSubscriptionService>();
  18. services.AddScoped<IWebhookDefinitionService, WebhookDefinitionService>();
  19. services.AddScoped<IWebhookPublisherService, WebhookPublisherService>();
  20. }
  21. /// <summary>
  22. /// App configuration
  23. /// </summary>
  24. public static void ConfigureBusiness(this WebApplication app)
  25. {
  26. //
  27. }
  28. }
  29. }