Presence.Desktop/presence_api/ServiceExtencions/ServiceExtensions.cs
2024-12-20 11:49:17 +03:00

18 lines
603 B
C#

using data.Domain.UseCase;
using data.Repository;
public class ServiceExtencions
{
public void ConfigureServices(IServiceCollection services)
{
// Ðåãèñòðàöèÿ ðåïîçèòîðèåâ
services.AddScoped<IUserRepository, SQLUserRepositoryImpl>() // Ðåãèñòðàöèÿ IUserRepository è åãî ðåàëèçàöèè
.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>()
.AddScoped<IPresenceRepository, SQLPresenceRepositoryImpl>()
.AddScoped<UseCaseGeneratePresence>(); // Ðåãèñòðàöèÿ UseCase
// Ïðî÷èå ñåðâèñû
services.AddControllers();
}
}