42 lines
1.5 KiB
C#
42 lines
1.5 KiB
C#
using data.Repository;
|
|
using domain.UseCase;
|
|
|
|
public static class ServiceExtensions
|
|
{
|
|
public static void ConfigurateGroup(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>();
|
|
services.AddScoped<GroupUseCase>();
|
|
}
|
|
|
|
public static void ConfigurateUser(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IUserRepository, SQLUserRepositoryImpl>();
|
|
services.AddScoped<UserUseCase>();
|
|
}
|
|
|
|
public static void ConfiguratePresence(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>();
|
|
services.AddScoped<UseCaseGeneratePresence>();
|
|
}
|
|
|
|
public static void ConfigurateAdminPanel(this IServiceCollection services)
|
|
{
|
|
|
|
services.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>();
|
|
services.AddScoped<IUserRepository, SQLUserRepositoryImpl>();
|
|
services.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>();
|
|
services.AddScoped<GroupUseCase>();
|
|
services.AddScoped<UserUseCase>();
|
|
services.AddScoped<UseCaseGeneratePresence>();
|
|
services.AddScoped<UseCaseAPI>();
|
|
}
|
|
|
|
public static void ConfigurateRepositories(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>();
|
|
services.AddScoped<IUserRepository, SQLUserRepositoryImpl>();
|
|
services.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>();
|
|
}
|
|
} |