33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
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>()
|
|
.AddScoped<GroupController>();
|
|
|
|
services
|
|
.AddDbContext<DatabaseContext>()
|
|
.AddScoped<IAdminRepository, SQLAdminRepository>()
|
|
.AddScoped<IAdminUseCase, AdminService>()
|
|
.AddScoped<AdminController>();
|
|
|
|
services
|
|
.AddDbContext<DatabaseContext>()
|
|
.AddScoped<IPresenceRepository, SQLPresenceRepository>()
|
|
.AddScoped<IPresenceUseCase, PresenceService>()
|
|
.AddScoped<PresenceController>();
|
|
}
|
|
}
|
|
}
|