26 lines
969 B
C#
Executable File
26 lines
969 B
C#
Executable File
using Posechaemost.Data.Repository;
|
|
using Posechaemost.Domain.UseCase;
|
|
using Posechaemost.UI;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System.Text.RegularExpressions;
|
|
using Posechaemost.Data.RemoteData.RemoteDataBase;
|
|
|
|
IServiceCollection services = new ServiceCollection();
|
|
|
|
services
|
|
.AddDbContext<RemoteDataBaseContext>()
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
.AddSingleton<UserUseCase>()
|
|
.AddSingleton<GroupUseCase>()
|
|
.AddSingleton<PresenceUseCase>()
|
|
.AddSingleton<PresenceConsoleUI>()
|
|
.AddSingleton<MainMenuUI>();
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
// Создаем пользовательский интерфейс
|
|
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|
|
|
|
// Выводим главное меню
|
|
mainMenuUI.DisplayMenu(); |