2024-10-17 11:46:19 +00:00
|
|
|
using Demo.Data.Repository;
|
|
|
|
using Demo.Domain.UseCase;
|
|
|
|
using Demo.UI;
|
2024-10-21 10:55:18 +00:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2024-10-17 11:46:19 +00:00
|
|
|
|
2024-10-21 10:55:18 +00:00
|
|
|
IServiceCollection services = new ServiceCollection();
|
2024-10-17 11:46:19 +00:00
|
|
|
|
2024-10-21 10:55:18 +00:00
|
|
|
services
|
|
|
|
.AddSingleton<IGroupRepository, GroupRepositoryImpl>()
|
|
|
|
.AddSingleton<IUserRepository, UserRepositoryImpl>()
|
|
|
|
.AddSingleton<IGroupUseCase, GroupUseCase>()
|
|
|
|
.AddSingleton<IUserUseCase, UserUseCase>()
|
|
|
|
.AddSingleton<UserConsoleUI>()
|
|
|
|
.AddSingleton<MainMenuUI>();
|
|
|
|
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
|
|
|
|
|
|
MainMenuUI? mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|