2024-11-11 11:41:12 +00:00
|
|
|
|
using Data.Repository;
|
|
|
|
|
using Zurnal.Data.Repository;
|
|
|
|
|
using Zurnal.Domain.UseCase;
|
|
|
|
|
using Zurnal.Presence;
|
|
|
|
|
using Zurnal.UI;
|
2024-10-21 11:56:16 +00:00
|
|
|
|
|
2024-11-07 11:31:00 +00:00
|
|
|
|
IServiceCollection services = new ServiceCollection();
|
2024-10-21 11:56:16 +00:00
|
|
|
|
|
2024-11-07 11:31:00 +00:00
|
|
|
|
services
|
|
|
|
|
.AddDbContext<RemoteDateBaseContext>()
|
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>()
|
|
|
|
|
.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-11-07 11:31:00 +00:00
|
|
|
|
|
2024-11-11 11:41:12 +00:00
|
|
|
|
mainMenuUI.DisplayMenu();
|