30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using Demo.Data.RemoteData.RemoteDataBase;
|
|
using Demo.Data.Repository;
|
|
using Demo.Domain.UseCase;
|
|
using Demo.UI;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
IServiceCollection services = new ServiceCollection();
|
|
services.AddDbContext<RemoteDatabaseContex>()
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryLmpl>()
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
.AddSingleton<GroupUseCase>()
|
|
.AddSingleton<UseCaseGeneratePresence>()
|
|
.AddSingleton<UserUseCase>()
|
|
.AddSingleton<UseCasePresence>()
|
|
.AddSingleton<UserConsoleUI>()
|
|
.AddSingleton<PresenceConsoleUI>()
|
|
.AddSingleton<GroupConsoleUI>()
|
|
.AddSingleton<MainMenuUI>();
|
|
var serviceProvaider = services.BuildServiceProvider();
|
|
MainMenuUI mainMenuUI= serviceProvaider.GetService<MainMenuUI>();
|
|
mainMenuUI.DisplayMenu();
|
|
}
|
|
}
|