123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using MediatR;
- using Microsoft.Extensions.DependencyInjection;
- using MTWorkHR.Application.Identity;
- using MTWorkHR.Application.Services;
- using MTWorkHR.Application.Services.Interfaces;
- using MTWorkHR.Core.Entities;
- 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.AddScoped<IAuthService, AuthService>();
- services.AddScoped<IUserService, UserService>();
- // services.AddTransient<IFileService, FileService>();
- services.AddScoped<IFileService, BlobFileService>();
- services.AddScoped<IProjectService, ProjectService>();
- services.AddScoped<IUserTaskService, UserTaskService>();
- services.AddScoped<IUserTaskAttachmentService, UserTaskAttachmentService>();
- services.AddScoped<IUserTaskHistoryService, UserTaskHistoryService>();
- services.AddScoped<ITeamService, TeamService>();
- services.AddScoped<IMeetingService, MeetingService>();
- services.AddScoped<IAttendanceService, AttendanceService>();
- services.AddScoped<IOrderAllocationService, OrderAllocationService>();
- services.AddScoped<IOrderRequestService, OrderRequestService>();
- services.AddScoped<ILookupService, LookupService>();
- services.AddScoped<ICompanyService, CompanyService>();
- services.AddScoped<IContractService, ContractService>();
- services.AddScoped<IContractTaskAttachmentService, ContractTaskAttachmentService>();
- services.AddScoped<IProjectStageAttachmentService, ProjectStageAttachmentService>();
- services.AddScoped<IOTPService, OTPService>();
- services.AddScoped<ILogService<UserLog>, LogService<UserLog>>();
- return services;
- }
- }
- }
|