12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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<IOTPService, OTPService>();
- services.AddScoped<ILogService<UserLog>, LogService<UserLog>>();
- return services;
- }
- }
- }
|