PresenceApp/presence_api/ServiceExtencions/ServiceExtensions.cs
2024-12-05 02:32:04 +03:00

18 lines
595 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<PresenceService>(); // Ðåãèñòðàöèÿ UseCase
// Ïðî÷èå ñåðâèñû
services.AddControllers();
}
}