28 lines
801 B
C#
28 lines
801 B
C#
using Zurnal.Data.Repository;
|
|
using Zurnal.Date.Repository.SQLRepos;
|
|
using Zurnal.Domain.UseCase;
|
|
using Zurnal.Presence;
|
|
using Zurnal.UI;
|
|
|
|
class Programka
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
IServiceCollection services = new ServiceCollection();
|
|
|
|
services
|
|
.AddDbContext<RemoteDateBaseContext>()
|
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
|
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
|
.AddSingleton<UserUseCase>()
|
|
.AddSingleton<GroupUseCase>()
|
|
.AddSingleton<UseCaseGeneratePresence>()
|
|
.AddSingleton<MainMenuUI>();
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|
|
|
|
mainMenuUI.DisplayMenu();
|
|
}
|
|
} |