presence_sample_v2/Presence.Api/Extensions/ServiceCollectionsExtension.cs

23 lines
567 B
C#
Raw Permalink Normal View History

2024-11-22 12:18:04 +00:00
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>();
}
}
}