1234567891011121314151617181920212223 |
- using Microsoft.Extensions.DependencyInjection;
- using Microsoft.Extensions.Configuration;
- using MTWorkHR.Application.Models.Email;
- using MTWorkHR.Infrastructure.EmailService;
- using MTWorkHR.Application.Logging;
- using MTWorkHR.Infrastructure.Logging;
- using MTWorkHR.Application.Services;
- using MTWorkHR.Core;
- namespace MTWorkHR.Infrastructure
- {
- public static class InfrastructureServiceRegistration
- {
- public static IServiceCollection AddInfrastructureServices (this IServiceCollection services, IConfiguration configuration){
- services.Configure<EmailSettings>(configuration.GetSection("MailSettings"));
- services.AddTransient<IEmailSender, EmailSender>();
- services.AddScoped(typeof(IAppLogger<>), typeof(LoggerAdapter<>));
- return services;
- }
- }
- }
|