123456789101112131415161718192021222324252627282930 |
- using MediatR;
- using Microsoft.Extensions.DependencyInjection;
- using MTWorkHR.Application.Identity;
- using MTWorkHR.Application.Services;
- using MTWorkHR.Application.Services.Interfaces;
- using MTWorkHR.Core.Global;
- using MTWorkHR.Identity.Services;
- using System.Reflection;
- namespace MTWorkHR.Application
- {
- public static class ApplicationServiceRegistration
- {
- public static IServiceCollection AddApplicationServices(this IServiceCollection services, AppSettingsConfiguration config)
- {
- services.AddSingleton(config);
- services.AddAutoMapper(Assembly.GetExecutingAssembly());
- services.AddMediatR(Assembly.GetExecutingAssembly());
- services.AddTransient<IAuthService, AuthService>();
- services.AddTransient<IUserService, UserService>();
- services.AddTransient<IFileService, FileService>();
-
- return services;
- }
- }
- }
|