refactor: Dependency registration updated to use direct type arguments for improved readability

This commit is contained in:
Developer 02
2024-08-05 11:10:11 +02:00
parent 7e66c5ddef
commit 777d071bb6

View File

@@ -9,39 +9,41 @@ namespace StaffDBServer.Extends
{
public static class ServiceExtensions4BaseRepository
{
public static void ConfigureRepositoryWrapper(this IServiceCollection services)
public static IServiceCollection ConfigureRepositoryWrapper(this IServiceCollection services)
{
services.AddScoped(typeof(IBaseRepository<Subsidiary>), typeof(SubsidiaryRepository));
services.AddScoped(typeof(IBaseRepository<WindreamInputFolder>), typeof(WindreamInputFolderRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearchToDepartment>), typeof(WindreamSearchToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearchItemToWindreamSearchToDepartment>), typeof(WindreamSearchItemToWindreamSearchToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearchItem>), typeof(WindreamSearchItemRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearch>), typeof(WindreamSearchRepository));
services.AddScoped(typeof(IBaseRepository<WindreamIndexToWindreamSearchToDepartment>), typeof(WindreamIndexToWindreamSearchToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WindreamIndex>), typeof(WindreamIndexRepository));
services.AddScoped(typeof(IBaseRepository<WindreamColumnsToDepartment>), typeof(WindreamColumnsToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WebAppToWebAppRole>), typeof(WebAppToWebAppRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebAppToWebAppAdditionalRole>), typeof(WebAppToWebAppAdditionalRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebAppToDepartment>), typeof(WebAppToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WebAppAdditionalRole>), typeof(WebAppAdditionalRoleRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeToWebApp>), typeof(EmployeeToWebAppRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeToDepartment>), typeof(EmployeeToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeToAttribute>), typeof(EmployeeToAttributeRepository));
services.AddScoped(typeof(IBaseRepository<Employee>), typeof(EmployeeRepository));
services.AddScoped(typeof(IBaseRepository<DocumentArtToDepartment>), typeof(DocumentArtToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<DepartmentToWebAppToEmployeeForWindream>), typeof(DepartmentToWebAppToEmployeeForWindreamRepository));
services.AddScoped(typeof(IBaseRepository<WebAppRole>), typeof(WebAppRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebApp>), typeof(WebAppRepository));
services.AddScoped(typeof(IBaseRepository<Rang>), typeof(RangRepository));
services.AddScoped(typeof(IBaseRepository<Project>), typeof(ProjectRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeStatus>), typeof(EmployeeStatusRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeAttribute>), typeof(EmployeeAttributeRepository));
services.AddScoped(typeof(IBaseRepository<DocumentArt>), typeof(DocumentArtRepository));
services.AddScoped(typeof(IBaseRepository<Department>), typeof(DepartmentRepository));
services.AddScoped(typeof(IBaseRepository<CostCentre>), typeof(CostCentreRepository));
services.AddScoped(typeof(IBaseRepository<AdWebAppToWebAppRole>), typeof(AdWebAppToWebAppRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebAppUser>), typeof(WebAppUserRepository));
services.AddScoped(typeof(IBaseRepository<WebAppEmployeeInfo>), typeof(WebAppEmployeeInfo));
services.AddScoped<IBaseRepository<Subsidiary>, SubsidiaryRepository>();
services.AddScoped<IBaseRepository<WindreamInputFolder>, WindreamInputFolderRepository>();
services.AddScoped<IBaseRepository<WindreamSearchToDepartment>, WindreamSearchToDepartmentRepository>();
services.AddScoped<IBaseRepository<WindreamSearchItemToWindreamSearchToDepartment>, WindreamSearchItemToWindreamSearchToDepartmentRepository>();
services.AddScoped<IBaseRepository<WindreamSearchItem>, WindreamSearchItemRepository>();
services.AddScoped<IBaseRepository<WindreamSearch>, WindreamSearchRepository>();
services.AddScoped<IBaseRepository<WindreamIndexToWindreamSearchToDepartment>, WindreamIndexToWindreamSearchToDepartmentRepository>();
services.AddScoped<IBaseRepository<WindreamIndex>, WindreamIndexRepository>();
services.AddScoped<IBaseRepository<WindreamColumnsToDepartment>, WindreamColumnsToDepartmentRepository>();
services.AddScoped<IBaseRepository<WebAppToWebAppRole>, WebAppToWebAppRoleRepository>();
services.AddScoped<IBaseRepository<WebAppToWebAppAdditionalRole>, WebAppToWebAppAdditionalRoleRepository>();
services.AddScoped<IBaseRepository<WebAppToDepartment>, WebAppToDepartmentRepository>();
services.AddScoped<IBaseRepository<WebAppAdditionalRole>, WebAppAdditionalRoleRepository>();
services.AddScoped<IBaseRepository<EmployeeToWebApp>, EmployeeToWebAppRepository>();
services.AddScoped<IBaseRepository<EmployeeToDepartment>, EmployeeToDepartmentRepository>();
services.AddScoped<IBaseRepository<EmployeeToAttribute>, EmployeeToAttributeRepository>();
services.AddScoped<IBaseRepository<Employee>, EmployeeRepository>();
services.AddScoped<IBaseRepository<DocumentArtToDepartment>, DocumentArtToDepartmentRepository>();
services.AddScoped<IBaseRepository<DepartmentToWebAppToEmployeeForWindream>, DepartmentToWebAppToEmployeeForWindreamRepository>();
services.AddScoped<IBaseRepository<WebAppRole>, WebAppRoleRepository>();
services.AddScoped<IBaseRepository<WebApp>, WebAppRepository>();
services.AddScoped<IBaseRepository<Rang>, RangRepository>();
services.AddScoped<IBaseRepository<Project>, ProjectRepository>();
services.AddScoped<IBaseRepository<EmployeeStatus>, EmployeeStatusRepository>();
services.AddScoped<IBaseRepository<EmployeeAttribute>, EmployeeAttributeRepository>();
services.AddScoped<IBaseRepository<DocumentArt>, DocumentArtRepository>();
services.AddScoped<IBaseRepository<Department>, DepartmentRepository>();
services.AddScoped<IBaseRepository<CostCentre>, CostCentreRepository>();
services.AddScoped<IBaseRepository<AdWebAppToWebAppRole>, AdWebAppToWebAppRoleRepository>();
services.AddScoped<IBaseRepository<WebAppUser>, WebAppUserRepository>();
services.AddScoped<IBaseRepository<WebAppEmployeeInfo>, WebAppEmployeeInfoRepository>();
return services;
}
}
}