2024-11-14 08:01:32 +00:00
|
|
|
using data.Repository;
|
|
|
|
using domain.UseCase;
|
|
|
|
|
|
|
|
public static class ServiceExtensions
|
|
|
|
{
|
|
|
|
public static void ConfigurateGroup(this IServiceCollection services)
|
|
|
|
{
|
|
|
|
services
|
|
|
|
.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>()
|
2024-11-14 09:06:54 +00:00
|
|
|
.AddScoped<GroupUseCase>();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void ConfigurateUser(this IServiceCollection services)
|
|
|
|
{
|
|
|
|
services
|
2024-11-14 08:17:32 +00:00
|
|
|
.AddScoped<IUserRepository, SQLUserRepositoryImpl>()
|
2024-11-14 09:06:54 +00:00
|
|
|
.AddScoped<UserUseCase>();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void ConfiguratePresence(this IServiceCollection services)
|
|
|
|
{
|
|
|
|
services
|
2024-11-14 08:17:32 +00:00
|
|
|
.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
|
|
.AddScoped<UseCaseGeneratePresence>();
|
|
|
|
|
2024-11-14 08:01:32 +00:00
|
|
|
}
|
2024-11-15 09:22:30 +00:00
|
|
|
|
|
|
|
public static void ConfigurateAdminPanel(this IServiceCollection services)
|
|
|
|
{
|
|
|
|
services
|
|
|
|
.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>()
|
|
|
|
.AddScoped<IUserRepository, SQLUserRepositoryImpl>()
|
|
|
|
.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
|
|
.AddScoped<GroupUseCase>()
|
|
|
|
.AddScoped<UserUseCase>()
|
|
|
|
.AddScoped<UseCaseGeneratePresence>();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void ConfigurateRepositories(this IServiceCollection services)
|
|
|
|
{
|
|
|
|
services.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>();
|
|
|
|
services.AddScoped<IUserRepository, SQLUserRepositoryImpl>();
|
|
|
|
services.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>();
|
|
|
|
}
|
2024-11-14 08:01:32 +00:00
|
|
|
}
|