22 lines
621 B
C#
22 lines
621 B
C#
using data;
|
|
using data.Repository;
|
|
using domain.UseCase;
|
|
using domain.Service;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Presence.Desktop.ViewModels;
|
|
|
|
namespace Presence.Desktop.DI
|
|
{
|
|
public static class ServiceCollectionExtension
|
|
{
|
|
public static void AddComonoServices(this IServiceCollection collection)
|
|
{
|
|
collection
|
|
.AddDbContext<DatabaseContext>()
|
|
.AddSingleton<IGroupRepository, SQLGroupRepository>()
|
|
.AddTransient<IGroupUseCase, GroupService>()
|
|
.AddTransient<MainWindowViewModel>();
|
|
}
|
|
}
|
|
}
|