presence_sample_v2/Presence.Desktop/DI/ServiceColletionExtensions.cs

27 lines
756 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 Microsoft.Extensions.DependencyInjection;
using Presence.Desktop.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace Presence.Desktop.DI
{
public static class ServiceColletionExtensions
{
public static void AddCommonService(this IServiceCollection collection) {
collection
.AddDbContext<RemoteDatabaseContext>()
.AddSingleton<IGroupRepository, SQLGroupRepository>()
.AddTransient<IGroupUseCase, GroupService>()
2024-12-04 08:11:13 +00:00
.AddTransient<GroupViewModel>();
2024-11-22 12:18:04 +00:00
}
}
}