presence/presence_api/ServiceExtensions/ServiceExtensions.cs
2024-11-29 10:41:36 +03:00

23 lines
710 B
C#

using Demo.Data.Repository;
using Demo.Domain.UseCase;
public static class ServiceExtencions
{
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>();
}
}