Vizual_Zurnal/Zurnal/console_ui/Program.cs

21 lines
739 B
C#
Raw Normal View History

2024-12-06 07:26:58 +00:00
using data.Repository;
using domain.UseCase;
using remoteData.RemoteDataBase;
using ui;
var 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>()
.AddSingleton<MainMenuUI>();
var serviceProvider = services.BuildServiceProvider();
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
mainMenuUI.DisplayMenu();