pr1/presence/presence_api/ServiceExtencions/ServiceExtencions.cs

23 lines
583 B
C#
Raw Normal View History

2024-12-05 09:30:01 +00:00
using Demo.Data.RemoteData.RemoteDataBase;
using Demo.Data.Repository;
using Demo.Domain.UseCase;
using Presence.Api.Controllers;
namespace presence_api.ServiceExtencions
{
public static class ServiceExtencions
{
public static void AddCommonServices(this IServiceCollection services)
{
services
.AddDbContext<RemoteDatabaseContext>()
.AddScoped<IGroupRepository, SQLGroupRepository>()
.AddScoped<IGroupUseCase, GroupService>()
.AddScoped<GroupController>();
}
}
}