presence_sample_v2/Presence.Api/Extensions/ServiceCollectionsExtension.cs
2024-11-22 15:18:04 +03:00

23 lines
567 B
C#

using data;
using data.Repository;
using domain.Service;
using domain.UseCase;
using Presence.Api.Controllers;
namespace Presence.Api.Extensions
{
public static class ServiceCollectionsExtension
{
public static void AddCommonServices(this IServiceCollection services) {
services
.AddDbContext<RemoteDatabaseContext>()
.AddScoped<IGroupRepository, SQLGroupRepository>()
.AddScoped<IGroupUseCase, GroupService>()
.AddScoped<GroupController>();
}
}
}