Raspisanie/Zurnal/Program.cs

28 lines
798 B
C#
Raw Normal View History

2024-11-11 11:41:23 +00:00
using Zurnal.Data.Repository;
using Zurnal.Date.Repository.SQLRepos;
2024-11-11 11:41:12 +00:00
using Zurnal.Domain.UseCase;
using Zurnal.Presence;
using Zurnal.UI;
2024-10-21 11:56:16 +00:00
2024-11-11 11:41:23 +00:00
class Programka
{
static void Main(string[] args)
{
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();
2024-11-11 11:41:23 +00:00
}
2024-11-11 11:42:39 +00:00
}