24 lines
813 B
C#
24 lines
813 B
C#
using data.RemoteData.RemoteDataBase;
|
|
using data.Repository;
|
|
using domain.UseCase;
|
|
using ui;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
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>()
|
|
.AddSingleton<MainMenuUI>();
|
|
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|
|
mainMenuUI.DisplayMenu(); |