22 lines
634 B
C#
22 lines
634 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using data;
|
|
using data.Repository;
|
|
using data.RemoteData.RemoteDataBase;
|
|
using Presence.Desktop.ViewModels;
|
|
using domain.UseCase;
|
|
|
|
namespace Presence.Desktop.DI
|
|
{
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static void AddCommonService(this IServiceCollection collection)
|
|
{
|
|
collection
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
|
.AddDbContext<RemoteDatabaseContext>()
|
|
.AddTransient<GroupUseCase>()
|
|
.AddTransient<MainWindowViewModel>();
|
|
}
|
|
}
|
|
}
|