presence/Presence.API/Extensions/ServiceCollectionExtension.cs
2024-11-26 08:09:12 +03:00

21 lines
557 B
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>();
}
}
}