2024-11-11 09:07:11 +00:00
|
|
|
|
using data.RemoteData.RemoteDataBase;
|
|
|
|
|
using data.Repository;
|
|
|
|
|
using domain.UseCase;
|
|
|
|
|
using ui;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2024-11-14 11:46:38 +00:00
|
|
|
|
using ui.ui;
|
2024-11-11 09:07:11 +00:00
|
|
|
|
|
|
|
|
|
IServiceCollection services = new ServiceCollection();
|
|
|
|
|
|
|
|
|
|
services
|
|
|
|
|
.AddDbContext<RemoteDatabaseContext>()
|
|
|
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
|
|
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
|
|
|
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
|
|
|
.AddSingleton<UserUseCase>()
|
|
|
|
|
.AddSingleton<GroupUseCase>()
|
|
|
|
|
.AddSingleton<UseCaseGeneratePresence>()
|
|
|
|
|
.AddSingleton<GroupConsoleUI>()
|
|
|
|
|
.AddSingleton<PresenceConsole>()
|
2024-11-14 08:01:32 +00:00
|
|
|
|
.AddSingleton<MainMenuUI>();
|
2024-11-11 09:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
|
|
|
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|
|
|
|
|
mainMenuUI.DisplayMenu();
|