123456789101112131415161718192021222324252627 |
- using MediatR;
- using Microsoft.Extensions.DependencyInjection;
- using MTWorkHR.Application.Identity;
- using MTWorkHR.Application.Services;
- 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>();
- return services;
- }
- }
- }
|