2024-12-11 08:30:05 +00:00
|
|
|
|
using data.Repository;
|
|
|
|
|
using domain.UseCase;
|
|
|
|
|
using remoteData.RemoteDataBase;
|
|
|
|
|
using ui;
|
|
|
|
|
var services = new ServiceCollection();
|
2024-10-21 11:56:16 +00:00
|
|
|
|
|
2024-11-07 11:31:00 +00:00
|
|
|
|
services
|
2024-12-11 08:30:05 +00:00
|
|
|
|
.AddDbContext<RemoteDatabaseContext>()
|
2024-11-11 11:41:12 +00:00
|
|
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
|
|
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
|
|
|
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
|
|
|
.AddSingleton<UserUseCase>()
|
2024-11-07 11:31:00 +00:00
|
|
|
|
.AddSingleton<GroupUseCase>()
|
2024-11-11 11:41:12 +00:00
|
|
|
|
.AddSingleton<UseCaseGeneratePresence>()
|
2024-12-11 08:30:05 +00:00
|
|
|
|
.AddSingleton<GroupConsoleUI>()
|
|
|
|
|
.AddSingleton<PresenceConsole>()
|
2024-11-11 11:41:12 +00:00
|
|
|
|
.AddSingleton<MainMenuUI>();
|
2024-11-07 11:31:00 +00:00
|
|
|
|
|
2024-11-11 11:41:12 +00:00
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
|
|
|
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|
2024-12-11 08:30:05 +00:00
|
|
|
|
mainMenuUI.DisplayMenu();
|