pr1/presence/presence_api/ServiceExtencions/ServiceExtencions.cs
2024-12-05 12:30:01 +03:00

23 lines
583 B
C#

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>();
}
}
}