1234567891011121314151617181920212223242526272829303132 |
- 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>();
- services.AddScoped<IProjectService, ProjectService>();
- services.AddScoped<IUserTaskService, UserTaskService>();
-
- return services;
- }
- }
- }
|