29 lines
954 B
C#
29 lines
954 B
C#
using Demo.Data.RemoteData.RemoteDataBase;
|
|
using Demo.Data.Repository;
|
|
using Demo.Domain.UseCase;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Presence.Desktop.ViewModels;
|
|
using ReactiveUI;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reactive.Concurrency;
|
|
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, SQLGroupRepositoryImpl>()
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
.AddTransient<IGroupUseCase, GroupUseCase>()
|
|
.AddTransient<IUserUseCase, UserUseCase>()
|
|
.AddTransient<GroupViewModel>();
|
|
}
|
|
}
|
|
} |