Presence_Desktop/presence_api/ServiceExtensions/ServiceExtensions.cs

42 lines
1.5 KiB
C#
Raw Permalink Normal View History

2024-12-23 11:20:09 +00:00
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>();
}
}