presence/presence_api/ServiceExtensions/ServiceExtensions.cs
2024-11-21 15:29:32 +03:00

33 lines
1.1 KiB
C#

using Demo.Data.Repository;
using Demo.Domain.UseCase;
public static class ServiceExtencions
{
// public static void ConfigurateGroup(this IServiceCollection services)
// {
// services.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>()
// .AddScoped<IUserRepository, SQLUserRepositoryImpl>()
// .AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>()
// .AddScoped<GroupUseCase>()
// .AddScoped<UserUseCase>()
// .AddScoped<PresenceUseCase>();
// }
public static void AddGroupServices(this IServiceCollection services)
{
services.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>()
.AddScoped<GroupUseCase>();
}
public static void AddUserServices(this IServiceCollection services)
{
services.AddScoped<IUserRepository, SQLUserRepositoryImpl>()
.AddScoped<UserUseCase>();
}
public static void AddPresenceServices(this IServiceCollection services)
{
services.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>()
.AddScoped<PresenceUseCase>();
}
}