presence/Presence.API/Extensions/ServiceCollectionExtension.cs

33 lines
1.0 KiB
C#
Raw Normal View History

2024-11-26 05:09:12 +00:00
using data;
using data.Repository;
using domain.Service;
using domain.UseCase;
using Presence.API.Controllers;
namespace Presence.API.Extensions
{
public static class ServiceCollectionExtension
{
public static void AddCommonServices(this IServiceCollection services)
{
services
.AddDbContext<DatabaseContext>()
.AddScoped<IGroupRepository, SQLGroupRepository>()
.AddScoped<IGroupUseCase, GroupService>()
2024-12-05 07:31:49 +00:00
.AddScoped<GroupController>();
services
.AddDbContext<DatabaseContext>()
.AddScoped<IAdminRepository, SQLAdminRepository>()
.AddScoped<IAdminUseCase, AdminService>()
2024-12-04 12:21:15 +00:00
.AddScoped<AdminController>();
2024-12-05 07:31:49 +00:00
services
.AddDbContext<DatabaseContext>()
.AddScoped<IPresenceRepository, SQLPresenceRepository>()
.AddScoped<IPresenceUseCase, PresenceService>()
.AddScoped<PresenceController>();
2024-11-26 05:09:12 +00:00
}
}
}